@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/milaboratories.monetization-test.model",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Block model",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -11,26 +11,13 @@
|
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@platforma-sdk/block-tools": "",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"tsup": {
|
|
19
|
-
"entry": [
|
|
20
|
-
"src/index.ts"
|
|
21
|
-
],
|
|
22
|
-
"splitting": false,
|
|
23
|
-
"treeshake": true,
|
|
24
|
-
"clean": true,
|
|
25
|
-
"format": [
|
|
26
|
-
"cjs",
|
|
27
|
-
"esm"
|
|
28
|
-
],
|
|
29
|
-
"dts": true,
|
|
30
|
-
"minify": false,
|
|
31
|
-
"sourcemap": true
|
|
14
|
+
"@milaboratories/build-configs": "",
|
|
15
|
+
"typescript": "~5.6.3",
|
|
16
|
+
"@milaboratories/ts-builder": "1.0.5",
|
|
17
|
+
"@milaboratories/ts-configs": "1.0.6"
|
|
32
18
|
},
|
|
33
19
|
"scripts": {
|
|
34
|
-
"build": "
|
|
20
|
+
"build": "ts-builder build --target block-model && block-tools build-model",
|
|
21
|
+
"type-check": "ts-builder types --target block-model"
|
|
35
22
|
}
|
|
36
23
|
}
|
package/src/index.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type BlockArgs = {
|
|
|
18
18
|
export const model = BlockModel.create()
|
|
19
19
|
.withArgs<BlockArgs>({
|
|
20
20
|
// a fake product key so our mnz client response with a fake response without changing prod db.
|
|
21
|
-
productKey: "
|
|
21
|
+
productKey: "PRODUCT:XTOKAYPLQDZWSPPUTFNHPAJQQZKKSPTCDOORHFJIOYICTRDA",
|
|
22
22
|
inputHandles: [],
|
|
23
23
|
shouldAddRunPerFile: false,
|
|
24
24
|
__mnzDate: new Date().toISOString(), // It's OK
|
|
@@ -30,8 +30,13 @@ export const model = BlockModel.create()
|
|
|
30
30
|
})
|
|
31
31
|
|
|
32
32
|
.output('__mnzInfo', (ctx) => ctx.prerun?.resolve('info')?.getDataAsJson<unknown>())
|
|
33
|
-
|
|
34
|
-
.output('
|
|
33
|
+
|
|
34
|
+
.output('tokens', (ctx) => ctx.outputs?.resolve('token')?.listInputFields().map((field) => {
|
|
35
|
+
return {
|
|
36
|
+
name: field,
|
|
37
|
+
value: ctx.outputs?.resolve('token', field)?.getDataAsString()
|
|
38
|
+
}
|
|
39
|
+
}))
|
|
35
40
|
|
|
36
41
|
.output('progresses', (ctx) => {
|
|
37
42
|
const m = ctx.prerun?.resolve('progresses');
|
|
@@ -47,6 +52,6 @@ export const model = BlockModel.create()
|
|
|
47
52
|
|
|
48
53
|
.sections((_) => [{ type: 'link', href: '/', label: 'Main' }])
|
|
49
54
|
|
|
50
|
-
.done();
|
|
55
|
+
.done(2);
|
|
51
56
|
|
|
52
57
|
export type BlockOutputs = InferOutputsType<typeof model>;
|
package/tsconfig.json
CHANGED
package/dist/index.d.cts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as _platforma_sdk_model from '@platforma-sdk/model';
|
|
2
|
-
import { ImportFileHandle, InferOutputsType } from '@platforma-sdk/model';
|
|
3
|
-
|
|
4
|
-
type Handle = {
|
|
5
|
-
handle: ImportFileHandle | undefined;
|
|
6
|
-
fileName: string;
|
|
7
|
-
argName: string;
|
|
8
|
-
options: string[];
|
|
9
|
-
};
|
|
10
|
-
type BlockArgs = {
|
|
11
|
-
productKey: string;
|
|
12
|
-
inputHandles: Handle[];
|
|
13
|
-
shouldAddRunPerFile: boolean;
|
|
14
|
-
__mnzDate: string;
|
|
15
|
-
__mnzCanRun: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const model: _platforma_sdk_model.Platforma<BlockArgs, {
|
|
18
|
-
__mnzInfo: _platforma_sdk_model.ValueOrErrors<{}>;
|
|
19
|
-
token: _platforma_sdk_model.ValueOrErrors<string | undefined>;
|
|
20
|
-
progresses: _platforma_sdk_model.ValueOrErrors<any>;
|
|
21
|
-
mainProgresses: _platforma_sdk_model.ValueOrErrors<any>;
|
|
22
|
-
}, {
|
|
23
|
-
[x: string]: never;
|
|
24
|
-
}, "/">;
|
|
25
|
-
type BlockOutputs = InferOutputsType<typeof model>;
|
|
26
|
-
|
|
27
|
-
export { type BlockArgs, type BlockOutputs, type Handle, model };
|
package/vite.config.mts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
build: {
|
|
5
|
-
emptyOutDir: false,
|
|
6
|
-
lib: {
|
|
7
|
-
entry: 'src/index.ts',
|
|
8
|
-
name: 'model',
|
|
9
|
-
fileName: (format) => `my-lib.${format}.js`
|
|
10
|
-
},
|
|
11
|
-
minify: false,
|
|
12
|
-
sourcemap: true,
|
|
13
|
-
rollupOptions: {
|
|
14
|
-
output: {
|
|
15
|
-
format: 'iife',
|
|
16
|
-
entryFileNames: 'bundle.js'
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|