@react-grab/ami 0.0.98 → 0.1.0-beta.1

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,34 +1,26 @@
1
1
  {
2
2
  "name": "@react-grab/ami",
3
- "version": "0.0.98",
3
+ "version": "0.1.0-beta.1",
4
4
  "type": "module",
5
- "bin": {
6
- "react-grab-ami": "./dist/cli.cjs"
7
- },
8
5
  "exports": {
9
6
  "./client": {
10
7
  "types": "./dist/client.d.ts",
11
8
  "import": "./dist/client.js",
12
9
  "require": "./dist/client.cjs"
13
10
  },
14
- "./server": {
15
- "types": "./dist/server.d.ts",
16
- "import": "./dist/server.js",
17
- "require": "./dist/server.cjs"
18
- }
11
+ "./dist/*": "./dist/*.js",
12
+ "./dist/*.js": "./dist/*.js"
19
13
  },
14
+ "browser": "dist/client.global.js",
20
15
  "files": [
21
16
  "dist"
22
17
  ],
23
18
  "devDependencies": {
24
19
  "@types/node": "^22.10.7",
25
- "tsup": "^8.4.0",
26
- "@react-grab/utils": "0.0.98"
20
+ "tsup": "^8.4.0"
27
21
  },
28
22
  "dependencies": {
29
- "ami-sdk": "^0.0.6",
30
- "picocolors": "^1.1.1",
31
- "react-grab": "0.0.98"
23
+ "react-grab": "0.1.0-beta.1"
32
24
  },
33
25
  "scripts": {
34
26
  "dev": "tsup --watch",
package/dist/cli.cjs DELETED
@@ -1,107 +0,0 @@
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 __commonJS = (cb, mod) => function __require() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- __defProp(target, "default", { value: mod, enumerable: true }) ,
27
- mod
28
- ));
29
-
30
- // ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
31
- var require_picocolors = __commonJS({
32
- "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
33
- var p = process || {};
34
- var argv = p.argv || [];
35
- var env = p.env || {};
36
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
37
- var formatter = (open, close, replace = open) => (input) => {
38
- let string = "" + input, index = string.indexOf(close, open.length);
39
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
40
- };
41
- var replaceClose = (string, close, replace, index) => {
42
- let result = "", cursor = 0;
43
- do {
44
- result += string.substring(cursor, index) + replace;
45
- cursor = index + close.length;
46
- index = string.indexOf(close, cursor);
47
- } while (~index);
48
- return result + string.substring(cursor);
49
- };
50
- var createColors = (enabled = isColorSupported) => {
51
- let f = enabled ? formatter : () => String;
52
- return {
53
- isColorSupported: enabled,
54
- reset: f("\x1B[0m", "\x1B[0m"),
55
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
56
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
57
- italic: f("\x1B[3m", "\x1B[23m"),
58
- underline: f("\x1B[4m", "\x1B[24m"),
59
- inverse: f("\x1B[7m", "\x1B[27m"),
60
- hidden: f("\x1B[8m", "\x1B[28m"),
61
- strikethrough: f("\x1B[9m", "\x1B[29m"),
62
- black: f("\x1B[30m", "\x1B[39m"),
63
- red: f("\x1B[31m", "\x1B[39m"),
64
- green: f("\x1B[32m", "\x1B[39m"),
65
- yellow: f("\x1B[33m", "\x1B[39m"),
66
- blue: f("\x1B[34m", "\x1B[39m"),
67
- magenta: f("\x1B[35m", "\x1B[39m"),
68
- cyan: f("\x1B[36m", "\x1B[39m"),
69
- white: f("\x1B[37m", "\x1B[39m"),
70
- gray: f("\x1B[90m", "\x1B[39m"),
71
- bgBlack: f("\x1B[40m", "\x1B[49m"),
72
- bgRed: f("\x1B[41m", "\x1B[49m"),
73
- bgGreen: f("\x1B[42m", "\x1B[49m"),
74
- bgYellow: f("\x1B[43m", "\x1B[49m"),
75
- bgBlue: f("\x1B[44m", "\x1B[49m"),
76
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
77
- bgCyan: f("\x1B[46m", "\x1B[49m"),
78
- bgWhite: f("\x1B[47m", "\x1B[49m"),
79
- blackBright: f("\x1B[90m", "\x1B[39m"),
80
- redBright: f("\x1B[91m", "\x1B[39m"),
81
- greenBright: f("\x1B[92m", "\x1B[39m"),
82
- yellowBright: f("\x1B[93m", "\x1B[39m"),
83
- blueBright: f("\x1B[94m", "\x1B[39m"),
84
- magentaBright: f("\x1B[95m", "\x1B[39m"),
85
- cyanBright: f("\x1B[96m", "\x1B[39m"),
86
- whiteBright: f("\x1B[97m", "\x1B[39m"),
87
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
88
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
89
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
90
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
91
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
92
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
93
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
94
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
95
- };
96
- };
97
- module.exports = createColors();
98
- module.exports.createColors = createColors;
99
- }
100
- });
101
-
102
- // src/cli.ts
103
- var import_picocolors = __toESM(require_picocolors());
104
- var VERSION = "0.0.98";
105
- console.log(
106
- `${import_picocolors.default.magenta("\u273F")} ${import_picocolors.default.bold("React Grab")} ${import_picocolors.default.gray(VERSION)} ${import_picocolors.default.dim("(Ami)")}`
107
- );
package/dist/cli.d.cts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
package/dist/cli.d.ts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
package/dist/cli.js DELETED
@@ -1,105 +0,0 @@
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 __commonJS = (cb, mod) => function __require() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- __defProp(target, "default", { value: mod, enumerable: true }) ,
25
- mod
26
- ));
27
-
28
- // ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
29
- var require_picocolors = __commonJS({
30
- "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js"(exports, module) {
31
- var p = process || {};
32
- var argv = p.argv || [];
33
- var env = p.env || {};
34
- var isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
35
- var formatter = (open, close, replace = open) => (input) => {
36
- let string = "" + input, index = string.indexOf(close, open.length);
37
- return ~index ? open + replaceClose(string, close, replace, index) + close : open + string + close;
38
- };
39
- var replaceClose = (string, close, replace, index) => {
40
- let result = "", cursor = 0;
41
- do {
42
- result += string.substring(cursor, index) + replace;
43
- cursor = index + close.length;
44
- index = string.indexOf(close, cursor);
45
- } while (~index);
46
- return result + string.substring(cursor);
47
- };
48
- var createColors = (enabled = isColorSupported) => {
49
- let f = enabled ? formatter : () => String;
50
- return {
51
- isColorSupported: enabled,
52
- reset: f("\x1B[0m", "\x1B[0m"),
53
- bold: f("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
54
- dim: f("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
55
- italic: f("\x1B[3m", "\x1B[23m"),
56
- underline: f("\x1B[4m", "\x1B[24m"),
57
- inverse: f("\x1B[7m", "\x1B[27m"),
58
- hidden: f("\x1B[8m", "\x1B[28m"),
59
- strikethrough: f("\x1B[9m", "\x1B[29m"),
60
- black: f("\x1B[30m", "\x1B[39m"),
61
- red: f("\x1B[31m", "\x1B[39m"),
62
- green: f("\x1B[32m", "\x1B[39m"),
63
- yellow: f("\x1B[33m", "\x1B[39m"),
64
- blue: f("\x1B[34m", "\x1B[39m"),
65
- magenta: f("\x1B[35m", "\x1B[39m"),
66
- cyan: f("\x1B[36m", "\x1B[39m"),
67
- white: f("\x1B[37m", "\x1B[39m"),
68
- gray: f("\x1B[90m", "\x1B[39m"),
69
- bgBlack: f("\x1B[40m", "\x1B[49m"),
70
- bgRed: f("\x1B[41m", "\x1B[49m"),
71
- bgGreen: f("\x1B[42m", "\x1B[49m"),
72
- bgYellow: f("\x1B[43m", "\x1B[49m"),
73
- bgBlue: f("\x1B[44m", "\x1B[49m"),
74
- bgMagenta: f("\x1B[45m", "\x1B[49m"),
75
- bgCyan: f("\x1B[46m", "\x1B[49m"),
76
- bgWhite: f("\x1B[47m", "\x1B[49m"),
77
- blackBright: f("\x1B[90m", "\x1B[39m"),
78
- redBright: f("\x1B[91m", "\x1B[39m"),
79
- greenBright: f("\x1B[92m", "\x1B[39m"),
80
- yellowBright: f("\x1B[93m", "\x1B[39m"),
81
- blueBright: f("\x1B[94m", "\x1B[39m"),
82
- magentaBright: f("\x1B[95m", "\x1B[39m"),
83
- cyanBright: f("\x1B[96m", "\x1B[39m"),
84
- whiteBright: f("\x1B[97m", "\x1B[39m"),
85
- bgBlackBright: f("\x1B[100m", "\x1B[49m"),
86
- bgRedBright: f("\x1B[101m", "\x1B[49m"),
87
- bgGreenBright: f("\x1B[102m", "\x1B[49m"),
88
- bgYellowBright: f("\x1B[103m", "\x1B[49m"),
89
- bgBlueBright: f("\x1B[104m", "\x1B[49m"),
90
- bgMagentaBright: f("\x1B[105m", "\x1B[49m"),
91
- bgCyanBright: f("\x1B[106m", "\x1B[49m"),
92
- bgWhiteBright: f("\x1B[107m", "\x1B[49m")
93
- };
94
- };
95
- module.exports = createColors();
96
- module.exports.createColors = createColors;
97
- }
98
- });
99
-
100
- // src/cli.ts
101
- var import_picocolors = __toESM(require_picocolors());
102
- var VERSION = "0.0.98";
103
- console.log(
104
- `${import_picocolors.default.magenta("\u273F")} ${import_picocolors.default.bold("React Grab")} ${import_picocolors.default.gray(VERSION)} ${import_picocolors.default.dim("(Ami)")}`
105
- );
package/dist/server.cjs DELETED
@@ -1,25 +0,0 @@
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.98";
11
- try {
12
- fetch(
13
- `https://www.react-grab.com/api/version?source=ami&t=${Date.now()}`
14
- ).catch(() => {
15
- });
16
- } catch {
17
- }
18
- var startServer = async (_port) => {
19
- console.log(
20
- `${pc__default.default.magenta("\u273F")} ${pc__default.default.bold("React Grab")} ${pc__default.default.gray(VERSION)} ${pc__default.default.dim("(Ami)")}`
21
- );
22
- console.log(`${pc__default.default.yellow("\u26A0")} Ami provider server is not yet implemented`);
23
- };
24
-
25
- exports.startServer = startServer;
package/dist/server.d.cts DELETED
@@ -1,3 +0,0 @@
1
- declare const startServer: (_port?: number) => Promise<void>;
2
-
3
- export { startServer };
package/dist/server.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare const startServer: (_port?: number) => Promise<void>;
2
-
3
- export { startServer };
package/dist/server.js DELETED
@@ -1,19 +0,0 @@
1
- import pc from 'picocolors';
2
-
3
- // src/server.ts
4
- var VERSION = "0.0.98";
5
- try {
6
- fetch(
7
- `https://www.react-grab.com/api/version?source=ami&t=${Date.now()}`
8
- ).catch(() => {
9
- });
10
- } catch {
11
- }
12
- var startServer = async (_port) => {
13
- console.log(
14
- `${pc.magenta("\u273F")} ${pc.bold("React Grab")} ${pc.gray(VERSION)} ${pc.dim("(Ami)")}`
15
- );
16
- console.log(`${pc.yellow("\u26A0")} Ami provider server is not yet implemented`);
17
- };
18
-
19
- export { startServer };