@milaboratories/milaboratories.monetization-test.model 1.0.1 → 1.0.3
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 +12 -12
- package/CHANGELOG.md +13 -0
- package/dist/bundle.js +86 -82
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +1 -1
- package/src/index.ts +7 -1
package/dist/index.cjs
CHANGED
|
@@ -6,8 +6,12 @@ var model$1 = require('@platforma-sdk/model');
|
|
|
6
6
|
var model = model$1.BlockModel.create().withArgs({
|
|
7
7
|
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
8
8
|
productKey: "MIFAKEMIFAKEMIFAKE",
|
|
9
|
-
inputHandles: []
|
|
10
|
-
|
|
9
|
+
inputHandles: [],
|
|
10
|
+
shouldAddRunPerFile: false,
|
|
11
|
+
__mnzDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
12
|
+
// It's OK
|
|
13
|
+
__mnzCanRun: false
|
|
14
|
+
}).output("__mnzInfo", (ctx) => ctx.prerun?.resolve("info")?.getDataAsJson()).output("token", (ctx) => ctx.outputs?.resolve("token")?.getDataAsString()).output("progresses", (ctx) => {
|
|
11
15
|
const m = ctx.prerun?.resolve("progresses");
|
|
12
16
|
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
13
17
|
return Object.fromEntries(progresses ?? []);
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["BlockModel"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["BlockModel"],"mappings":";;;;;AAiBO,IAAM,KAAQ,GAAAA,kBAAA,CAAW,MAAO,EAAA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AAM,CAAC,EAAE,IAAA,EAAM,MAAQ,EAAA,IAAA,EAAM,KAAK,KAAO,EAAA,MAAA,EAAQ,CAAC,EAE5D,IAAK","file":"index.cjs","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 .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"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -10,9 +10,12 @@ type Handle = {
|
|
|
10
10
|
type BlockArgs = {
|
|
11
11
|
productKey: string;
|
|
12
12
|
inputHandles: Handle[];
|
|
13
|
+
shouldAddRunPerFile: boolean;
|
|
14
|
+
__mnzDate: string;
|
|
15
|
+
__mnzCanRun: boolean;
|
|
13
16
|
};
|
|
14
17
|
declare const model: _platforma_sdk_model.Platforma<BlockArgs, {
|
|
15
|
-
|
|
18
|
+
__mnzInfo: _platforma_sdk_model.ValueOrErrors<{}>;
|
|
16
19
|
token: _platforma_sdk_model.ValueOrErrors<string | undefined>;
|
|
17
20
|
progresses: _platforma_sdk_model.ValueOrErrors<any>;
|
|
18
21
|
mainProgresses: _platforma_sdk_model.ValueOrErrors<any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,9 +10,12 @@ type Handle = {
|
|
|
10
10
|
type BlockArgs = {
|
|
11
11
|
productKey: string;
|
|
12
12
|
inputHandles: Handle[];
|
|
13
|
+
shouldAddRunPerFile: boolean;
|
|
14
|
+
__mnzDate: string;
|
|
15
|
+
__mnzCanRun: boolean;
|
|
13
16
|
};
|
|
14
17
|
declare const model: _platforma_sdk_model.Platforma<BlockArgs, {
|
|
15
|
-
|
|
18
|
+
__mnzInfo: _platforma_sdk_model.ValueOrErrors<{}>;
|
|
16
19
|
token: _platforma_sdk_model.ValueOrErrors<string | undefined>;
|
|
17
20
|
progresses: _platforma_sdk_model.ValueOrErrors<any>;
|
|
18
21
|
mainProgresses: _platforma_sdk_model.ValueOrErrors<any>;
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,12 @@ import { BlockModel } from '@platforma-sdk/model';
|
|
|
4
4
|
var model = BlockModel.create().withArgs({
|
|
5
5
|
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
6
6
|
productKey: "MIFAKEMIFAKEMIFAKE",
|
|
7
|
-
inputHandles: []
|
|
8
|
-
|
|
7
|
+
inputHandles: [],
|
|
8
|
+
shouldAddRunPerFile: false,
|
|
9
|
+
__mnzDate: (/* @__PURE__ */ new Date()).toISOString(),
|
|
10
|
+
// It's OK
|
|
11
|
+
__mnzCanRun: false
|
|
12
|
+
}).output("__mnzInfo", (ctx) => ctx.prerun?.resolve("info")?.getDataAsJson()).output("token", (ctx) => ctx.outputs?.resolve("token")?.getDataAsString()).output("progresses", (ctx) => {
|
|
9
13
|
const m = ctx.prerun?.resolve("progresses");
|
|
10
14
|
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
11
15
|
return Object.fromEntries(progresses ?? []);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAiBO,IAAM,KAAQ,GAAA,UAAA,CAAW,MAAO,EAAA,CACpC,QAAoB,CAAA;AAAA;AAAA,EAEnB,UAAY,EAAA,oBAAA;AAAA,EACZ,cAAc,EAAC;AAAA,EACf,mBAAqB,EAAA,KAAA;AAAA,EACrB,SAAW,EAAA,iBAAA,IAAI,IAAK,EAAA,EAAE,WAAY,EAAA;AAAA;AAAA,EAClC,WAAa,EAAA;AACf,CAAC,CAEA,CAAA,MAAA,CAAO,WAAa,EAAA,CAAC,GAAQ,KAAA,GAAA,CAAI,MAAQ,EAAA,OAAA,CAAQ,MAAM,CAAA,EAAG,aAAuB,EAAC,CAElF,CAAA,MAAA,CAAO,OAAS,EAAA,CAAC,GAAQ,KAAA,GAAA,CAAI,OAAS,EAAA,OAAA,CAAQ,OAAO,CAAA,EAAG,eAAgB,EAAC,CAEzE,CAAA,MAAA,CAAO,YAAc,EAAA,CAAC,GAAQ,KAAA;AAC7B,EAAA,MAAM,CAAI,GAAA,GAAA,CAAI,MAAQ,EAAA,OAAA,CAAQ,YAAY,CAAA;AAC1C,EAAM,MAAA,UAAA,GAAa,CAAG,EAAA,SAAA,CAAU,CAAC,IAAA,EAAM,GAAQ,KAAA,CAAC,IAAM,EAAA,GAAA,EAAK,iBAAkB,EAAC,CAAC,CAAA;AAC/E,EAAA,OAAO,MAAO,CAAA,WAAA,CAAY,UAAc,IAAA,EAAE,CAAA;AAC5C,CAAC,CAEA,CAAA,MAAA,CAAO,gBAAkB,EAAA,CAAC,GAAQ,KAAA;AACjC,EAAA,MAAM,CAAI,GAAA,GAAA,CAAI,OAAS,EAAA,OAAA,CAAQ,YAAY,CAAA;AAC3C,EAAM,MAAA,UAAA,GAAa,CAAG,EAAA,SAAA,CAAU,CAAC,IAAA,EAAM,GAAQ,KAAA,CAAC,IAAM,EAAA,GAAA,EAAK,iBAAkB,EAAC,CAAC,CAAA;AAC/E,EAAA,OAAO,MAAO,CAAA,WAAA,CAAY,UAAc,IAAA,EAAE,CAAA;AAC5C,CAAC,CAEA,CAAA,QAAA,CAAS,CAAC,CAAA,KAAM,CAAC,EAAE,IAAA,EAAM,MAAQ,EAAA,IAAA,EAAM,KAAK,KAAO,EAAA,MAAA,EAAQ,CAAC,EAE5D,IAAK","file":"index.js","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 .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"]}
|