@milaboratories/milaboratories.monetization-test.model 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +18 -29
- package/.turbo/turbo-type-check.log +6 -0
- package/CHANGELOG.md +8 -0
- package/dist/bundle.js +6847 -5638
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +26 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -12
- package/dist/index.js +26 -21
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +7 -20
- package/tsconfig.json +11 -15
- package/dist/index.d.cts +0 -27
- package/vite.config.mts +0 -20
package/dist/index.cjs
CHANGED
|
@@ -2,27 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
var model$1 = require('@platforma-sdk/model');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
5
|
+
const model = model$1.BlockModel.create()
|
|
6
|
+
.withArgs({
|
|
7
|
+
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
8
|
+
productKey: "MIFAKEMIFAKEMIFAKE",
|
|
9
|
+
inputHandles: [],
|
|
10
|
+
shouldAddRunPerFile: false,
|
|
11
|
+
__mnzDate: new Date().toISOString(), // It's OK
|
|
12
|
+
__mnzCanRun: false,
|
|
13
|
+
})
|
|
14
|
+
.argsValid((ctx) => {
|
|
15
|
+
return ctx.args.__mnzCanRun;
|
|
16
|
+
})
|
|
17
|
+
.output('__mnzInfo', (ctx) => ctx.prerun?.resolve('info')?.getDataAsJson())
|
|
18
|
+
.output('token', (ctx) => ctx.outputs?.resolve('token')?.getDataAsString())
|
|
19
|
+
.output('progresses', (ctx) => {
|
|
20
|
+
const m = ctx.prerun?.resolve('progresses');
|
|
21
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
22
|
+
return Object.fromEntries(progresses ?? []);
|
|
23
|
+
})
|
|
24
|
+
.output('mainProgresses', (ctx) => {
|
|
25
|
+
const m = ctx.outputs?.resolve('progresses');
|
|
26
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
27
|
+
return Object.fromEntries(progresses ?? []);
|
|
28
|
+
})
|
|
29
|
+
.sections((_) => [{ type: 'link', href: '/', label: 'Main' }])
|
|
30
|
+
.done();
|
|
25
31
|
|
|
26
32
|
exports.model = model;
|
|
27
33
|
//# sourceMappingURL=index.cjs.map
|
|
28
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { BlockModel, ImportFileHandle, ImportProgress, InferOutputsType } from '@platforma-sdk/model';\n\nexport type Handle = {\n handle: ImportFileHandle | undefined;\n fileName: string;\n argName: string;\n options: string[];\n}\n\nexport type BlockArgs = {\n productKey: string;\n inputHandles: Handle[];\n shouldAddRunPerFile: boolean;\n __mnzDate: string;\n __mnzCanRun: boolean;\n};\n\nexport const model = BlockModel.create()\n .withArgs<BlockArgs>({\n // a fake product key so our mnz client response with a fake response without changing prod db.\n productKey: \"MIFAKEMIFAKEMIFAKE\",\n inputHandles: [],\n shouldAddRunPerFile: false,\n __mnzDate: new Date().toISOString(), // It's OK\n __mnzCanRun: false,\n })\n\n .argsValid((ctx) => {\n return ctx.args.__mnzCanRun;\n })\n\n .output('__mnzInfo', (ctx) => ctx.prerun?.resolve('info')?.getDataAsJson<unknown>())\n\n .output('token', (ctx) => ctx.outputs?.resolve('token')?.getDataAsString())\n\n .output('progresses', (ctx) => {\n const m = ctx.prerun?.resolve('progresses');\n const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()])\n return Object.fromEntries(progresses ?? []);\n })\n\n .output('mainProgresses', (ctx) => {\n const m = ctx.outputs?.resolve('progresses');\n const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()])\n return Object.fromEntries(progresses ?? []);\n })\n\n .sections((_) => [{ type: 'link', href: '/', label: 'Main' }])\n\n .done();\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":["BlockModel"],"mappings":";;;;AAiBO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;AACnC,KAAA,QAAQ,CAAY;;AAEnB,IAAA,UAAU,EAAE,oBAAoB;AAChC,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,mBAAmB,EAAE,KAAK;IAC1B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AACnC,IAAA,WAAW,EAAE,KAAK;CACnB;AAEA,KAAA,SAAS,CAAC,CAAC,GAAG,KAAI;AACjB,IAAA,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW;AAC7B,CAAC;AAEA,KAAA,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,aAAa,EAAW;AAElF,KAAA,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,eAAe,EAAE;AAEzE,KAAA,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,KAAI;IAC5B,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC;IAC3C,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,IAAI,EAAE,CAAC;AAC7C,CAAC;AAEA,KAAA,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,KAAI;IAChC,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC;IAC5C,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,IAAI,EAAE,CAAC;AAC7C,CAAC;KAEA,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAE5D,KAAA,IAAI;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import * as _platforma_sdk_model from '@platforma-sdk/model';
|
|
2
1
|
import { ImportFileHandle, InferOutputsType } from '@platforma-sdk/model';
|
|
3
|
-
|
|
4
|
-
type Handle = {
|
|
2
|
+
export type Handle = {
|
|
5
3
|
handle: ImportFileHandle | undefined;
|
|
6
4
|
fileName: string;
|
|
7
5
|
argName: string;
|
|
8
6
|
options: string[];
|
|
9
7
|
};
|
|
10
|
-
type BlockArgs = {
|
|
8
|
+
export type BlockArgs = {
|
|
11
9
|
productKey: string;
|
|
12
10
|
inputHandles: Handle[];
|
|
13
11
|
shouldAddRunPerFile: boolean;
|
|
14
12
|
__mnzDate: string;
|
|
15
13
|
__mnzCanRun: boolean;
|
|
16
14
|
};
|
|
17
|
-
declare const model:
|
|
18
|
-
__mnzInfo:
|
|
19
|
-
token:
|
|
20
|
-
progresses:
|
|
21
|
-
mainProgresses:
|
|
15
|
+
export declare const model: import('@platforma-sdk/model').PlatformaV1<BlockArgs, {
|
|
16
|
+
__mnzInfo: import('@milaboratories/pl-model-common').ValueOrErrors<{}>;
|
|
17
|
+
token: import('@milaboratories/pl-model-common').ValueOrErrors<string | undefined>;
|
|
18
|
+
progresses: import('@milaboratories/pl-model-common').ValueOrErrors<any>;
|
|
19
|
+
mainProgresses: import('@milaboratories/pl-model-common').ValueOrErrors<any>;
|
|
22
20
|
}, {
|
|
23
21
|
[x: string]: never;
|
|
24
22
|
}, "/">;
|
|
25
|
-
type BlockOutputs = InferOutputsType<typeof model>;
|
|
26
|
-
|
|
27
|
-
export { type BlockArgs, type BlockOutputs, type Handle, model };
|
|
23
|
+
export type BlockOutputs = InferOutputsType<typeof model>;
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import { BlockModel } from '@platforma-sdk/model';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
const model = BlockModel.create()
|
|
4
|
+
.withArgs({
|
|
5
|
+
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
6
|
+
productKey: "MIFAKEMIFAKEMIFAKE",
|
|
7
|
+
inputHandles: [],
|
|
8
|
+
shouldAddRunPerFile: false,
|
|
9
|
+
__mnzDate: new Date().toISOString(), // It's OK
|
|
10
|
+
__mnzCanRun: false,
|
|
11
|
+
})
|
|
12
|
+
.argsValid((ctx) => {
|
|
13
|
+
return ctx.args.__mnzCanRun;
|
|
14
|
+
})
|
|
15
|
+
.output('__mnzInfo', (ctx) => ctx.prerun?.resolve('info')?.getDataAsJson())
|
|
16
|
+
.output('token', (ctx) => ctx.outputs?.resolve('token')?.getDataAsString())
|
|
17
|
+
.output('progresses', (ctx) => {
|
|
18
|
+
const m = ctx.prerun?.resolve('progresses');
|
|
19
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
20
|
+
return Object.fromEntries(progresses ?? []);
|
|
21
|
+
})
|
|
22
|
+
.output('mainProgresses', (ctx) => {
|
|
23
|
+
const m = ctx.outputs?.resolve('progresses');
|
|
24
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
25
|
+
return Object.fromEntries(progresses ?? []);
|
|
26
|
+
})
|
|
27
|
+
.sections((_) => [{ type: 'link', href: '/', label: 'Main' }])
|
|
28
|
+
.done();
|
|
23
29
|
|
|
24
30
|
export { model };
|
|
25
31
|
//# sourceMappingURL=index.js.map
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { BlockModel, ImportFileHandle, ImportProgress, InferOutputsType } from '@platforma-sdk/model';\n\nexport type Handle = {\n handle: ImportFileHandle | undefined;\n fileName: string;\n argName: string;\n options: string[];\n}\n\nexport type BlockArgs = {\n productKey: string;\n inputHandles: Handle[];\n shouldAddRunPerFile: boolean;\n __mnzDate: string;\n __mnzCanRun: boolean;\n};\n\nexport const model = BlockModel.create()\n .withArgs<BlockArgs>({\n // a fake product key so our mnz client response with a fake response without changing prod db.\n productKey: \"MIFAKEMIFAKEMIFAKE\",\n inputHandles: [],\n shouldAddRunPerFile: false,\n __mnzDate: new Date().toISOString(), // It's OK\n __mnzCanRun: false,\n })\n\n .argsValid((ctx) => {\n return ctx.args.__mnzCanRun;\n })\n\n .output('__mnzInfo', (ctx) => ctx.prerun?.resolve('info')?.getDataAsJson<unknown>())\n\n .output('token', (ctx) => ctx.outputs?.resolve('token')?.getDataAsString())\n\n .output('progresses', (ctx) => {\n const m = ctx.prerun?.resolve('progresses');\n const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()])\n return Object.fromEntries(progresses ?? []);\n })\n\n .output('mainProgresses', (ctx) => {\n const m = ctx.outputs?.resolve('progresses');\n const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()])\n return Object.fromEntries(progresses ?? []);\n })\n\n .sections((_) => [{ type: 'link', href: '/', label: 'Main' }])\n\n .done();\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":[],"mappings":";;AAiBO,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM;AACnC,KAAA,QAAQ,CAAY;;AAEnB,IAAA,UAAU,EAAE,oBAAoB;AAChC,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,mBAAmB,EAAE,KAAK;IAC1B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AACnC,IAAA,WAAW,EAAE,KAAK;CACnB;AAEA,KAAA,SAAS,CAAC,CAAC,GAAG,KAAI;AACjB,IAAA,OAAO,GAAG,CAAC,IAAI,CAAC,WAAW;AAC7B,CAAC;AAEA,KAAA,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,aAAa,EAAW;AAElF,KAAA,MAAM,CAAC,OAAO,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,eAAe,EAAE;AAEzE,KAAA,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,KAAI;IAC5B,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC;IAC3C,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,IAAI,EAAE,CAAC;AAC7C,CAAC;AAEA,KAAA,MAAM,CAAC,gBAAgB,EAAE,CAAC,GAAG,KAAI;IAChC,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC;IAC5C,MAAM,UAAU,GAAG,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,IAAI,EAAE,CAAC;AAC7C,CAAC;KAEA,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAE5D,KAAA,IAAI;;;;"}
|