Socket
Socket
Sign inDemoInstall

noodl-types

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

noodl-types - npm Package Compare versions

Comparing version 1.0.190 to 1.0.191

0

dist/__tests__/identify.test.d.ts
export {};

36

dist/__tests__/identify.test.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const com = (0, tslib_1.__importStar)(require("noodl-common"));
const u = (0, tslib_1.__importStar)(require("@jsmanifest/utils"));
const chai_1 = require("chai");
const t = (0, tslib_1.__importStar)(require(".."));
const label = (s) => com.italic(com.white(s));
describe(com.coolGold('Identify'), () => {
const label = (s) => u.italic(u.white(s));
describe(u.yellow('Identify'), () => {
describe(label('actionChain'), () => {

@@ -22,3 +22,3 @@ it(`should accept emit objects`, () => {

});
it(`should accept emit, goto, and toast objects`, () => {
it(`should accept emit and goto`, () => {
(0, chai_1.expect)(t.Identify.actionChain([

@@ -85,3 +85,2 @@ { emit: { dataKey: { var1: 'itemObject' } }, actions: [] },

'=.SignIn.loginNewDevice.edgeAPI.store': false,
// '=.builtIn.math.random': false,
'.Global.currentUser.dataCache.loadingDateTime@': false,

@@ -93,3 +92,3 @@ '=.Global.currentUser.vertex.sk': false,

'..formData.countryCode': true,
'.formData.countryCode': true,
'.formData.countryCode': false,
'=.SignIn.formData.countryCode': false,

@@ -140,3 +139,3 @@ '=..verificationCode.response.edge.deat.phone_number': true,

describe(`await references`, () => {
Object.entries(tests.await).forEach(([reference, expectedValue]) => {
u.entries(tests.await).forEach(([reference, expectedValue]) => {
it(`should be ${expectedValue} for ${reference}`, () => {

@@ -148,3 +147,3 @@ (0, chai_1.expect)(t.Identify.awaitReference(reference)).to.be[String(expectedValue)];

describe(`evolve references`, () => {
Object.entries(tests.evolve).forEach(([reference, expectedValue]) => {
u.entries(tests.evolve).forEach(([reference, expectedValue]) => {
it(`should be ${expectedValue} for ${reference}`, () => {

@@ -156,3 +155,3 @@ (0, chai_1.expect)(t.Identify.evalReference(reference)).to.be[String(expectedValue)];

describe(`local merge references`, () => {
Object.entries(tests.local).forEach(([reference, expectedValue]) => {
u.entries(tests.local).forEach(([reference, expectedValue]) => {
it(`should be ${expectedValue} for ${reference}`, () => {

@@ -164,3 +163,3 @@ (0, chai_1.expect)(t.Identify.localReference(reference)).to.be[String(expectedValue)];

describe(`root merge references`, () => {
Object.entries(tests.root).forEach(([reference, expectedValue]) => {
u.entries(tests.root).forEach(([reference, expectedValue]) => {
it(`should be ${expectedValue} for ${reference}`, () => {

@@ -172,3 +171,3 @@ (0, chai_1.expect)(t.Identify.rootReference(reference)).to.be[String(expectedValue)];

describe(`traverse references`, () => {
Object.entries(tests.traverse).forEach(([reference, expectedValue]) => {
u.entries(tests.traverse).forEach(([reference, expectedValue]) => {
it(`should be ${expectedValue} for ${reference}`, () => {

@@ -180,3 +179,3 @@ (0, chai_1.expect)(t.Identify.traverseReference(reference)).to.be[String(expectedValue)];

describe(`tilde references`, () => {
Object.entries(tests.tilde).forEach(([reference, expectedValue]) => {
u.entries(tests.tilde).forEach(([reference, expectedValue]) => {
it(`should be ${expectedValue} for ${reference}`, () => {

@@ -188,16 +187,3 @@ (0, chai_1.expect)(t.Identify.tildeReference(reference)).to.be[String(expectedValue)];

});
describe(label('toast'), () => {
it(`should be a toast`, () => {
(0, chai_1.expect)(t.Identify.folds.toast({ toast: { message: 'hello', style: {} } }))
.to.be.true;
});
it(`should not be a toast`, () => {
(0, chai_1.expect)(t.Identify.folds.toast({ toasft: { message: 'hello', style: {} } })).to.be.false;
(0, chai_1.expect)(t.Identify.folds.toast({})).to.be.false;
(0, chai_1.expect)(t.Identify.folds.toast('fasfas')).to.be.false;
(0, chai_1.expect)(t.Identify.folds.toast(5)).to.be.false;
(0, chai_1.expect)(t.Identify.folds.toast(null)).to.be.false;
});
});
});
//# sourceMappingURL=identify.test.js.map
export declare const componentTypes: readonly ["button", "chart", "divider", "footer", "header", "image", "label", "list", "listItem", "page", "plugin", "pluginHead", "pluginBodyTail", "popUp", "register", "select", "scrollView", "textField", "textView", "video", "view"];
export declare const minimalStyleKeys: string[];
export declare const minimalBorderStyleKeys: string[];

@@ -0,0 +0,0 @@ "use strict";

export * from './utils';

@@ -0,0 +0,0 @@ "use strict";

export declare type OrArray<V = any> = V | V[];
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

@@ -0,0 +0,0 @@ import { NameField, ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { LiteralUnion } from 'type-fest';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=actionTypes.js.map

@@ -0,0 +0,0 @@ import { ActionObject } from './actionTypes';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=componentTypes.js.map

@@ -0,0 +0,0 @@ export declare const action: {

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import * as c from './constants';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=constantTypes.js.map

@@ -1,3 +0,3 @@

import { EmitObjectFold, IfObject } from './uncategorizedTypes';
import { OrArray } from './_internal/types';
import type { EmitObjectFold, IfObject } from './uncategorizedTypes';
import type { OrArray } from './_internal/types';
export declare type RootConfig = {

@@ -4,0 +4,0 @@ /** Example: albh2.aitmed.io */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// export namespace NameField {
// export namespace Doc {
// export type Epub = DocumentObject<'application/epub+zip'>
// // prettier-ignore
// export type Excel = DocumentObject<`application/${'vnd.ms-excel' | 'vnd.openxmlformats-officedocument.spreadsheetml.sheet'}`>
// export type Json = DocumentObject<'application/json'>
// export type Pdf = DocumentObject<'application/pdf'>
// // prettier-ignore
// export type PowerPoint = DocumentObject<`application/${'vnd.ms-powerpoint' | 'vnd.openxmlformats-officedocument.presentationml.presentatio'}`>
// // prettier-ignore
// export type Zipped = DocumentObject<`application/${'vnd.rar' | 'x-7z-compressed' | 'x-tar' | 'zip'}`>
// // prettier-ignore
// export type Word = DocumentObject<`application/${'msword' | 'vnd.openxmlformats-officedocument.wordprocessingml.document'}`>
// export type RichTxt = DocumentObject<'application/rtf'>
// }
// export namespace Media {
// export type Audio = MediaObject<NameField.MimeType.Audio>
// export type Image = MediaObject<NameField.MimeType.Image>
// export type Video = MediaObject<NameField.MimeType.Video>
// }
// export namespace Text {
// export type Csv = TextObject<`text/csv`>
// export type Html = TextObject<`text/html`>
// export type JavaScript = TextObject<`text/javascript`>
// export type Plain = TextObject<`text/plain`>
// export type Markdown = TextObject<`text/markdown`>
// export type Xml = TextObject<`text/xml`>
// }
// }
//# sourceMappingURL=ecosTypes.js.map

@@ -201,2 +201,3 @@ import isAwaitReference from './utils/isAwaitReference';

traverseReference: typeof isTraverseReference;
pageComponentUrl(v?: string): v is `${string}@${string}#${string}`;
textBoard(v: unknown): v is t.TextBoardObject;

@@ -203,0 +204,0 @@ textBoardItem<O_1 extends {

@@ -49,3 +49,3 @@ "use strict";

actionChain(v) {
return (i.isObj(v) && [o.action.any, o.emit, o.goto].some((fn) => v.some(fn)));
return (i.isArr(v) && [o.action.any, o.emit, o.goto].some((fn) => v.some(fn)));
},

@@ -171,2 +171,11 @@ /**

traverseReference: isTraverseReference_1.default,
pageComponentUrl(v = '') {
if (!i.isStr(v))
return false;
const parts = v.split(/(@|#)/);
if (parts.length !== 5)
return false;
const [_, separator1, __, separator2, ___] = parts;
return separator1 === '@' && separator2 === '#';
},
textBoard(v) {

@@ -184,3 +193,4 @@ return i.isArr(v) && v.some(o.textBoardItem);

const folds = {
actionChain: identifyArr((v) => i.isArr(v) && v.some(composeSomes(o.action.any, o.emit, o.goto))),
actionChain: identifyArr((v) => i.isArr(v) &&
v.some(composeSomes(o.action.any, (v) => i.isObj(v) && 'emit' in v, (v) => i.isObj(v) && 'goto' in v))),
component: Object.assign({

@@ -187,0 +197,0 @@ any(v) {

@@ -0,0 +0,0 @@ export * from './actionTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ComponentObject } from './componentTypes';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=pageTypes.js.map

@@ -0,0 +0,0 @@ export interface StyleObject {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=styleTypes.js.map

@@ -0,0 +0,0 @@ import { ActionObject } from './actionTypes';

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=uncategorizedTypes.js.map

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -11,3 +11,3 @@ "use strict";

function isAwaitReference(v = '') {
if (v.startsWith('@'))
if (v.endsWith('@'))
return true;

@@ -14,0 +14,0 @@ return false;

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ReferenceString } from '../ecosTypes';

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ "use strict";

@@ -40,3 +40,3 @@ {

"typings": "./dist/index.d.ts",
"version": "1.0.190"
"version": "1.0.191"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc