@evoke-platform/sdk 1.0.0-dev.23 → 1.0.0-dev.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/sdk",
3
- "version": "1.0.0-dev.23",
3
+ "version": "1.0.0-dev.24",
4
4
  "description": "SDK for Evoke platform",
5
5
  "homepage": "https://github.com/Evoke-Platform/evoke-sdk/blob/main/packages/sdk/README.md",
6
6
  "repository": {
@@ -11,9 +11,6 @@
11
11
  "bugs": {
12
12
  "url": "https://github.com/Evoke-Platform/evoke-sdk/issues"
13
13
  },
14
- "bin": {
15
- "pkgplugin": "./bin/package-plugin.js"
16
- },
17
14
  "scripts": {
18
15
  "release": "commit-and-tag-version -t sdk@ --releaseCommitMessageFormat \"chore(release): sdk@{{currentTag}} [skip ci]\"",
19
16
  "deploy": "npm publish --access=public"
@@ -22,9 +19,7 @@
22
19
  "license": "MIT",
23
20
  "dependencies": {
24
21
  "@evoke-platform/context": "latest",
25
- "@evoke-platform/ui-components": "latest",
26
- "jszip": "^3.10.0",
27
- "mkdirp": "^2.1.6"
22
+ "@evoke-platform/ui-components": "latest"
28
23
  },
29
24
  "devDependencies": {
30
25
  "commit-and-tag-version": "^11.2.0"
@@ -1,58 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // Copyright (c) 2023 System Automation Corporation.
4
- // This file is licensed under the MIT License.
5
-
6
- 'use strict';
7
-
8
- const fs = require('fs');
9
- const path = require('path');
10
- const JSZip = require('jszip');
11
- const { mkdirp } = require('mkdirp');
12
-
13
- async function generate() {
14
- const zip = new JSZip();
15
- const distDir = path.resolve(process.cwd(), './dist');
16
- const targetDir = path.resolve(process.cwd(), './target');
17
- const target = path.resolve(targetDir, './plugin.zip');
18
-
19
- console.log(`Generating plugin from contents in ${distDir}`);
20
-
21
- await addContentsToZip(zip, distDir);
22
- await mkdirp(targetDir);
23
-
24
- const zipStream = zip.generateNodeStream();
25
- const outStream = fs.createWriteStream(target);
26
-
27
- await new Promise((resolve, reject) => {
28
- zipStream.pipe(outStream);
29
-
30
- outStream.on('finish', resolve);
31
- zipStream.on('error', (err) => {
32
- outStream.end();
33
- reject(err);
34
- });
35
- });
36
-
37
- console.log(`Plugin generated at ${target}`);
38
- }
39
-
40
- async function addContentsToZip(zip, dir) {
41
- const entries = await fs.promises.readdir(dir, { withFileTypes: true });
42
-
43
- for (const entry of entries) {
44
- const entryPath = path.resolve(dir, `./${entry.name}`);
45
-
46
- if (entry.isFile()) {
47
- zip.file(entry.name, fs.createReadStream(entryPath));
48
- } else if (entry.isDirectory()) {
49
- const zipView = zip.folder(entry.name);
50
-
51
- await addContentsToZip(zipView, entryPath);
52
- }
53
- }
54
- }
55
-
56
- generate().catch((err) => {
57
- console.error(err);
58
- });