Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions etc/blocks/blob-url-custom-protocol/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import.meta.dirname couldn't be used here?


export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/blob-url-custom-protocol/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-blob-url-custom-protocol",
"type": "module",
"version": "1.0.63",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/blob-url-custom-protocol/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
17 changes: 8 additions & 9 deletions etc/blocks/download-file/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/download-file/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-download-file",
"type": "module",
"version": "1.0.127",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/download-file/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
17 changes: 8 additions & 9 deletions etc/blocks/enter-numbers-v3/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/enter-numbers-v3/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-enter-numbers-v3",
"type": "module",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/enter-numbers-v3/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
17 changes: 8 additions & 9 deletions etc/blocks/enter-numbers/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/enter-numbers/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-enter-numbers",
"type": "module",
"version": "1.0.249",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/enter-numbers/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
15 changes: 7 additions & 8 deletions etc/blocks/model-test/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname,
};

module.exports = {
blockSpec,
loadBlockDescription,
};
1 change: 1 addition & 0 deletions etc/blocks/model-test/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-block-model",
"type": "module",
"version": "1.0.167",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/model-test/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/monetization-test/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "1.1.9",
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
11 changes: 7 additions & 4 deletions etc/blocks/monetization-test/workflow/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module.exports = {
Templates: {
main: { type: "from-file", path: require.resolve("./dist/tengo/tpl/main.plj.gz") },
},
import { fileURLToPath } from "node:url";
import { dirname, resolve } from "node:path";

const __dirname = dirname(fileURLToPath(import.meta.url));

export const Templates = {
main: { type: "from-file", path: resolve(__dirname, "./dist/tengo/tpl/main.plj.gz") },
};
3 changes: 1 addition & 2 deletions etc/blocks/pool-explorer/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "1.2.9",
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
17 changes: 8 additions & 9 deletions etc/blocks/read-logs/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/read-logs/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-read-logs",
"type": "module",
"version": "1.0.127",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/read-logs/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
17 changes: 8 additions & 9 deletions etc/blocks/sum-numbers-v3/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/sum-numbers-v3/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-sum-numbers-v3",
"type": "module",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/sum-numbers-v3/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
17 changes: 8 additions & 9 deletions etc/blocks/sum-numbers/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname
};

module.exports = {
blockSpec,
loadBlockDescription
folder: __dirname,
};
1 change: 1 addition & 0 deletions etc/blocks/sum-numbers/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-sum-numbers",
"type": "module",
"version": "1.0.127",
"private": true,
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/sum-numbers/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
15 changes: 7 additions & 8 deletions etc/blocks/table-test/block/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const blockTools = require('@platforma-sdk/block-tools');
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import * as blockTools from '@platforma-sdk/block-tools';

async function loadBlockDescription() {
const __dirname = dirname(fileURLToPath(import.meta.url));

export async function loadBlockDescription() {
return await blockTools.loadPackDescriptionFromSource(__dirname);
}

const blockSpec = {
export const blockSpec = {
type: 'dev-v2',
folder: __dirname,
};

module.exports = {
blockSpec,
loadBlockDescription,
};
1 change: 1 addition & 0 deletions etc/blocks/table-test/block/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@milaboratories/milaboratories.test-block-table",
"type": "module",
"version": "1.0.0",
"private": true,
"files": [
Expand Down
3 changes: 1 addition & 2 deletions etc/blocks/table-test/model/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"description": "Block model",
"type": "module",
"main": "dist/index.cjs",
"module": "dist/index.js",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "ts-builder build --target block-model && block-tools build-model",
Expand Down
Loading
Loading