@react-grab/ami 0.0.80 → 0.0.82

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/dist/cli.cjs ADDED
@@ -0,0 +1,90 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
11
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
12
+ }) : x)(function(x) {
13
+ if (typeof require !== "undefined") return require.apply(this, arguments);
14
+ throw Error('Dynamic require of "' + x + '" is not supported');
15
+ });
16
+ var __commonJS = (cb, mod) => function __require2() {
17
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") {
21
+ for (let key of __getOwnPropNames(from))
22
+ if (!__hasOwnProp.call(to, key) && key !== except)
23
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
24
+ }
25
+ return to;
26
+ };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
28
+ // If the importer is in node compatibility mode or this is not an ESM
29
+ // file that has been converted to a CommonJS file using a Babel-
30
+ // compatible transform (i.e. "__esModule" has not been set), then set
31
+ // "default" to the CommonJS "module.exports" for node compatibility.
32
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
33
+ mod
34
+ ));
35
+
36
+ // ../../../../node_modules/picocolors/picocolors.js
37
+ var require_picocolors = __commonJS({
38
+ "../../../../node_modules/picocolors/picocolors.js"(exports, module) {
39
+ var tty = __require("tty");
40
+ var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
41
+ var formatter = (open, close, replace = open) => (input) => {
42
+ let string = "" + input;
43
+ let index = string.indexOf(close, open.length);
44
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
45
+ };
46
+ var replaceClose = (string, close, replace, index) => {
47
+ let start = string.substring(0, index) + replace;
48
+ let end = string.substring(index + close.length);
49
+ let nextIndex = end.indexOf(close);
50
+ return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
51
+ };
52
+ var createColors = (enabled = isColorSupported) => ({
53
+ isColorSupported: enabled,
54
+ reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
55
+ bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
56
+ dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
57
+ italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
58
+ underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
59
+ inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
60
+ hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
61
+ strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
62
+ black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
63
+ red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
64
+ green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
65
+ yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
66
+ blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
67
+ magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
68
+ cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
69
+ white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
70
+ gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
71
+ bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
72
+ bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
73
+ bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
74
+ bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
75
+ bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
76
+ bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
77
+ bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
78
+ bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
79
+ });
80
+ module.exports = createColors();
81
+ module.exports.createColors = createColors;
82
+ }
83
+ });
84
+
85
+ // src/cli.ts
86
+ var import_picocolors = __toESM(require_picocolors());
87
+ var VERSION = "0.0.82";
88
+ console.log(
89
+ `${import_picocolors.default.magenta("\u269B")} ${import_picocolors.default.bold("React Grab")} ${import_picocolors.default.gray(VERSION)} ${import_picocolors.default.dim("(Ami)")}`
90
+ );
package/dist/cli.d.cts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/cli.js ADDED
@@ -0,0 +1,88 @@
1
+ #!/usr/bin/env node
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __commonJS = (cb, mod) => function __require2() {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
31
+ mod
32
+ ));
33
+
34
+ // ../../../../node_modules/picocolors/picocolors.js
35
+ var require_picocolors = __commonJS({
36
+ "../../../../node_modules/picocolors/picocolors.js"(exports, module) {
37
+ var tty = __require("tty");
38
+ var isColorSupported = !("NO_COLOR" in process.env || process.argv.includes("--no-color")) && ("FORCE_COLOR" in process.env || process.argv.includes("--color") || process.platform === "win32" || tty.isatty(1) && process.env.TERM !== "dumb" || "CI" in process.env);
39
+ var formatter = (open, close, replace = open) => (input) => {
40
+ let string = "" + input;
41
+ let index = string.indexOf(close, open.length);
42
+ return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
43
+ };
44
+ var replaceClose = (string, close, replace, index) => {
45
+ let start = string.substring(0, index) + replace;
46
+ let end = string.substring(index + close.length);
47
+ let nextIndex = end.indexOf(close);
48
+ return ~nextIndex ? start + replaceClose(end, close, replace, nextIndex) : start + end;
49
+ };
50
+ var createColors = (enabled = isColorSupported) => ({
51
+ isColorSupported: enabled,
52
+ reset: enabled ? (s) => `\x1B[0m${s}\x1B[0m` : String,
53
+ bold: enabled ? formatter("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m") : String,
54
+ dim: enabled ? formatter("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m") : String,
55
+ italic: enabled ? formatter("\x1B[3m", "\x1B[23m") : String,
56
+ underline: enabled ? formatter("\x1B[4m", "\x1B[24m") : String,
57
+ inverse: enabled ? formatter("\x1B[7m", "\x1B[27m") : String,
58
+ hidden: enabled ? formatter("\x1B[8m", "\x1B[28m") : String,
59
+ strikethrough: enabled ? formatter("\x1B[9m", "\x1B[29m") : String,
60
+ black: enabled ? formatter("\x1B[30m", "\x1B[39m") : String,
61
+ red: enabled ? formatter("\x1B[31m", "\x1B[39m") : String,
62
+ green: enabled ? formatter("\x1B[32m", "\x1B[39m") : String,
63
+ yellow: enabled ? formatter("\x1B[33m", "\x1B[39m") : String,
64
+ blue: enabled ? formatter("\x1B[34m", "\x1B[39m") : String,
65
+ magenta: enabled ? formatter("\x1B[35m", "\x1B[39m") : String,
66
+ cyan: enabled ? formatter("\x1B[36m", "\x1B[39m") : String,
67
+ white: enabled ? formatter("\x1B[37m", "\x1B[39m") : String,
68
+ gray: enabled ? formatter("\x1B[90m", "\x1B[39m") : String,
69
+ bgBlack: enabled ? formatter("\x1B[40m", "\x1B[49m") : String,
70
+ bgRed: enabled ? formatter("\x1B[41m", "\x1B[49m") : String,
71
+ bgGreen: enabled ? formatter("\x1B[42m", "\x1B[49m") : String,
72
+ bgYellow: enabled ? formatter("\x1B[43m", "\x1B[49m") : String,
73
+ bgBlue: enabled ? formatter("\x1B[44m", "\x1B[49m") : String,
74
+ bgMagenta: enabled ? formatter("\x1B[45m", "\x1B[49m") : String,
75
+ bgCyan: enabled ? formatter("\x1B[46m", "\x1B[49m") : String,
76
+ bgWhite: enabled ? formatter("\x1B[47m", "\x1B[49m") : String
77
+ });
78
+ module.exports = createColors();
79
+ module.exports.createColors = createColors;
80
+ }
81
+ });
82
+
83
+ // src/cli.ts
84
+ var import_picocolors = __toESM(require_picocolors());
85
+ var VERSION = "0.0.82";
86
+ console.log(
87
+ `${import_picocolors.default.magenta("\u269B")} ${import_picocolors.default.bold("React Grab")} ${import_picocolors.default.gray(VERSION)} ${import_picocolors.default.dim("(Ami)")}`
88
+ );
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var pc = require('picocolors');
4
+
5
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
+
7
+ var pc__default = /*#__PURE__*/_interopDefault(pc);
8
+
9
+ // src/server.ts
10
+ var VERSION = "0.0.82";
11
+ var startServer = async (_port) => {
12
+ console.log(
13
+ `${pc__default.default.magenta("\u269B")} ${pc__default.default.bold("React Grab")} ${pc__default.default.gray(VERSION)} ${pc__default.default.dim("(Ami)")}`
14
+ );
15
+ console.log(`${pc__default.default.yellow("\u26A0")} Ami provider server is not yet implemented`);
16
+ };
17
+
18
+ exports.startServer = startServer;
@@ -0,0 +1,3 @@
1
+ declare const startServer: (_port?: number) => Promise<void>;
2
+
3
+ export { startServer };
@@ -0,0 +1,3 @@
1
+ declare const startServer: (_port?: number) => Promise<void>;
2
+
3
+ export { startServer };
package/dist/server.js ADDED
@@ -0,0 +1,12 @@
1
+ import pc from 'picocolors';
2
+
3
+ // src/server.ts
4
+ var VERSION = "0.0.82";
5
+ var startServer = async (_port) => {
6
+ console.log(
7
+ `${pc.magenta("\u269B")} ${pc.bold("React Grab")} ${pc.gray(VERSION)} ${pc.dim("(Ami)")}`
8
+ );
9
+ console.log(`${pc.yellow("\u26A0")} Ami provider server is not yet implemented`);
10
+ };
11
+
12
+ export { startServer };
package/package.json CHANGED
@@ -1,12 +1,20 @@
1
1
  {
2
2
  "name": "@react-grab/ami",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "type": "module",
5
+ "bin": {
6
+ "react-grab-ami": "./dist/cli.cjs"
7
+ },
5
8
  "exports": {
6
9
  "./client": {
7
10
  "types": "./dist/client.d.ts",
8
11
  "import": "./dist/client.js",
9
12
  "require": "./dist/client.cjs"
13
+ },
14
+ "./server": {
15
+ "types": "./dist/server.d.ts",
16
+ "import": "./dist/server.js",
17
+ "require": "./dist/server.cjs"
10
18
  }
11
19
  },
12
20
  "files": [
@@ -17,10 +25,11 @@
17
25
  },
18
26
  "dependencies": {
19
27
  "ami-sdk": "^0.0.6",
20
- "react-grab": "0.0.80"
28
+ "picocolors": "^1.1.1",
29
+ "react-grab": "0.0.82"
21
30
  },
22
31
  "scripts": {
23
32
  "dev": "tsup --watch",
24
- "build": "NODE_ENV=production tsup"
33
+ "build": "rm -rf dist && NODE_ENV=production tsup"
25
34
  }
26
35
  }