@milaboratories/milaboratories.monetization-test.model 1.0.5 → 1.0.7
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 +14 -29
- package/.turbo/turbo-type-check.log +6 -0
- package/CHANGELOG.md +15 -0
- package/dist/bundle.js +6838 -5639
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +31 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -12
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -21
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +7 -20
- package/src/index.ts +9 -4
- package/tsconfig.json +3 -2
- package/dist/index.d.cts +0 -27
- package/vite.config.mts +0 -20
package/dist/index.cjs
CHANGED
|
@@ -2,27 +2,37 @@
|
|
|
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: "PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA",
|
|
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('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {
|
|
19
|
+
return {
|
|
20
|
+
name: field,
|
|
21
|
+
value: ctx.outputs?.resolve('token', field)?.getDataAsString()
|
|
22
|
+
};
|
|
23
|
+
}))
|
|
24
|
+
.output('progresses', (ctx) => {
|
|
25
|
+
const m = ctx.prerun?.resolve('progresses');
|
|
26
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
27
|
+
return Object.fromEntries(progresses ?? []);
|
|
28
|
+
})
|
|
29
|
+
.output('mainProgresses', (ctx) => {
|
|
30
|
+
const m = ctx.outputs?.resolve('progresses');
|
|
31
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
32
|
+
return Object.fromEntries(progresses ?? []);
|
|
33
|
+
})
|
|
34
|
+
.sections((_) => [{ type: 'link', href: '/', label: 'Main' }])
|
|
35
|
+
.done(2);
|
|
25
36
|
|
|
26
37
|
exports.model = model;
|
|
27
38
|
//# sourceMappingURL=index.cjs.map
|
|
28
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["BlockModel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":[null],"names":["BlockModel"],"mappings":";;;;AAiBO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;AACnC,KAAA,QAAQ,CAAY;;AAEnB,IAAA,UAAU,EAAE,0DAA0D;AACtE,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;AACj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AAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;KAE5D,IAAI,CAAC,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
export declare const model: import("@platforma-sdk/model").PlatformaV2<BlockArgs, {
|
|
16
|
+
__mnzInfo: import("@platforma-sdk/model").ValueOrErrors<{}>;
|
|
17
|
+
tokens: import("@platforma-sdk/model").ValueOrErrors<{
|
|
18
|
+
name: string;
|
|
19
|
+
value: string | undefined;
|
|
20
|
+
}[] | undefined>;
|
|
21
|
+
progresses: import("@platforma-sdk/model").ValueOrErrors<any>;
|
|
22
|
+
mainProgresses: import("@platforma-sdk/model").ValueOrErrors<any>;
|
|
22
23
|
}, {
|
|
23
24
|
[x: string]: never;
|
|
24
25
|
}, "/">;
|
|
25
|
-
type BlockOutputs = InferOutputsType<typeof model>;
|
|
26
|
-
|
|
27
|
-
export { type BlockArgs, type BlockOutputs, type Handle, model };
|
|
26
|
+
export type BlockOutputs = InferOutputsType<typeof model>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,gBAAgB,EAAkB,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEtG,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,CAAA;AAED,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
|
@@ -1,26 +1,36 @@
|
|
|
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: "PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA",
|
|
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('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {
|
|
17
|
+
return {
|
|
18
|
+
name: field,
|
|
19
|
+
value: ctx.outputs?.resolve('token', field)?.getDataAsString()
|
|
20
|
+
};
|
|
21
|
+
}))
|
|
22
|
+
.output('progresses', (ctx) => {
|
|
23
|
+
const m = ctx.prerun?.resolve('progresses');
|
|
24
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
25
|
+
return Object.fromEntries(progresses ?? []);
|
|
26
|
+
})
|
|
27
|
+
.output('mainProgresses', (ctx) => {
|
|
28
|
+
const m = ctx.outputs?.resolve('progresses');
|
|
29
|
+
const progresses = m?.mapFields((name, val) => [name, val?.getImportProgress()]);
|
|
30
|
+
return Object.fromEntries(progresses ?? []);
|
|
31
|
+
})
|
|
32
|
+
.sections((_) => [{ type: 'link', href: '/', label: 'Main' }])
|
|
33
|
+
.done(2);
|
|
23
34
|
|
|
24
35
|
export { model };
|
|
25
36
|
//# sourceMappingURL=index.js.map
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAiBO,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM;AACnC,KAAA,QAAQ,CAAY;;AAEnB,IAAA,UAAU,EAAE,0DAA0D;AACtE,IAAA,YAAY,EAAE,EAAE;AAChB,IAAA,mBAAmB,EAAE,KAAK;IAC1B,SAAS,EAAE,IAAI,IAAI,EAAE,CA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