@milaboratories/milaboratories.monetization-test.model 1.0.34 → 1.0.35
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 +3 -3
- package/.turbo/turbo-lint.log +5 -0
- package/.turbo/turbo-type-check.log +2 -2
- package/CHANGELOG.md +6 -0
- package/dist/bundle.js +2 -2
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/eslint.config.mjs +7 -0
- package/package.json +8 -5
- package/src/index.ts +12 -11
- package/tsconfig.json +4 -11
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var model$1 = require('@platforma-sdk/model');
|
|
|
5
5
|
const model = model$1.BlockModel.create()
|
|
6
6
|
.withArgs({
|
|
7
7
|
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
8
|
-
productKey:
|
|
8
|
+
productKey: 'PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA',
|
|
9
9
|
inputHandles: [],
|
|
10
10
|
shouldAddRunPerFile: false,
|
|
11
11
|
__mnzDate: new Date().toISOString(), // It's OK
|
|
@@ -18,7 +18,7 @@ const model = model$1.BlockModel.create()
|
|
|
18
18
|
.output('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {
|
|
19
19
|
return {
|
|
20
20
|
name: field,
|
|
21
|
-
value: ctx.outputs?.resolve('token', field)?.getDataAsString()
|
|
21
|
+
value: ctx.outputs?.resolve('token', field)?.getDataAsString(),
|
|
22
22
|
};
|
|
23
23
|
}))
|
|
24
24
|
.output('progresses', (ctx) => {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { ImportFileHandle, InferOutputsType } from '@platforma-sdk/model';\nimport { BlockModel } 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: 'PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA',\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('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {\n return {\n name: field,\n value: ctx.outputs?.resolve('token', field)?.getDataAsString(),\n };\n }))\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 ?? []) as Record<string, unknown>;\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 ?? []) as Record<string, unknown>;\n })\n\n .sections((_) => [{ type: 'link', href: '/', label: 'Main' }])\n\n .done(2);\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":["BlockModel"],"mappings":";;;;AAkBO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;AACnC,KAAA,QAAQ,CAAY;;AAEnB,IAAA,UAAU,EAA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EAAE,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChF,OAAO,MAAM,CAAC,WAAW,CAAC,UAAU,IAAI,EAAE,CAA4B;AACxE,CAAC;KAEA,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;KAE5D,IAAI,CAAC,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImportFileHandle, InferOutputsType } from '@platforma-sdk/model';
|
|
1
|
+
import type { ImportFileHandle, InferOutputsType } from '@platforma-sdk/model';
|
|
2
2
|
export type Handle = {
|
|
3
3
|
handle: ImportFileHandle | undefined;
|
|
4
4
|
fileName: string;
|
|
@@ -18,9 +18,14 @@ export declare const model: import("@platforma-sdk/model").PlatformaV2<BlockArgs
|
|
|
18
18
|
name: string;
|
|
19
19
|
value: string | undefined;
|
|
20
20
|
}[] | undefined>;
|
|
21
|
-
progresses: import("@platforma-sdk/model").ValueOrErrors<
|
|
22
|
-
|
|
21
|
+
progresses: import("@platforma-sdk/model").ValueOrErrors<{
|
|
22
|
+
[x: string]: {};
|
|
23
|
+
}>;
|
|
24
|
+
mainProgresses: import("@platforma-sdk/model").ValueOrErrors<{
|
|
25
|
+
[x: string]: {};
|
|
26
|
+
}>;
|
|
23
27
|
}, {
|
|
24
28
|
[x: string]: never;
|
|
25
29
|
}, "/">;
|
|
26
30
|
export type BlockOutputs = InferOutputsType<typeof model>;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG/E,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;OAqCR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { BlockModel } from '@platforma-sdk/model';
|
|
|
3
3
|
const model = BlockModel.create()
|
|
4
4
|
.withArgs({
|
|
5
5
|
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
6
|
-
productKey:
|
|
6
|
+
productKey: 'PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA',
|
|
7
7
|
inputHandles: [],
|
|
8
8
|
shouldAddRunPerFile: false,
|
|
9
9
|
__mnzDate: new Date().toISOString(), // It's OK
|
|
@@ -16,7 +16,7 @@ const model = BlockModel.create()
|
|
|
16
16
|
.output('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {
|
|
17
17
|
return {
|
|
18
18
|
name: field,
|
|
19
|
-
value: ctx.outputs?.resolve('token', field)?.getDataAsString()
|
|
19
|
+
value: ctx.outputs?.resolve('token', field)?.getDataAsString(),
|
|
20
20
|
};
|
|
21
21
|
}))
|
|
22
22
|
.output('progresses', (ctx) => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { ImportFileHandle, InferOutputsType } from '@platforma-sdk/model';\nimport { BlockModel } 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: 'PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA',\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('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {\n return {\n name: field,\n value: ctx.outputs?.resolve('token', field)?.getDataAsString(),\n };\n }))\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 ?? []) as Record<string, unknown>;\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 ?? []) as Record<string, unknown>;\n })\n\n .sections((_) => [{ type: 'link', href: '/', label: 'Main' }])\n\n .done(2);\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":[],"mappings":";;AAkBO,MAAM,K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