@crewx/notify 0.1.0-rc.17 → 0.1.0-rc.170
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/SKILL.md +6 -5
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +4 -140
- package/dist/src/engine.d.ts +1 -1
- package/dist/src/engine.js +2 -74
- package/package.json +2 -2
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/src/engine.d.ts.map +0 -1
- package/dist/src/engine.js.map +0 -1
package/SKILL.md
CHANGED
|
@@ -14,8 +14,8 @@ It sends the notification to the server's `POST /api/v1/notifications` endpoint
|
|
|
14
14
|
## Commands
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
crewx notify "<title>" [--level=info|warning|critical] [--body="..."]
|
|
18
|
+
crewx notify usage
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
- `title` (required) — Notification title. Passed as a positional argument.
|
|
@@ -24,7 +24,7 @@ npx crewx notify usage
|
|
|
24
24
|
- `usage` — Prints this `SKILL.md` as-is.
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
crewx notify "Deploy needs approval" --level=warning --body="Staging is green; confirm prod."
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## When To Use
|
|
@@ -51,13 +51,14 @@ When not to use:
|
|
|
51
51
|
|----------|---------|
|
|
52
52
|
| `CREWX_WORKSPACE` | Absolute workspace path to route the notification to (required) |
|
|
53
53
|
| `CREWX_ENDPOINT` | CrewX server URL (default `http://localhost:8150`) |
|
|
54
|
-
| `CREWX_API_TOKEN` |
|
|
54
|
+
| `CREWX_API_TOKEN` | Explicit server auth token override; otherwise the runtime credential file is used |
|
|
55
55
|
| `CREWX_AGENT_ID` | Id of the agent that created the notification (included if present) |
|
|
56
56
|
| `CREWX_TASK_ID` | Related task id (included if present) |
|
|
57
57
|
| `CREWX_THREAD_ID` | Related thread id (included if present) |
|
|
58
58
|
|
|
59
59
|
## Notes
|
|
60
60
|
|
|
61
|
-
-
|
|
61
|
+
- Authentication uses `CREWX_API_TOKEN` when set, otherwise `~/.crewx/auth/runtime/notify.token`.
|
|
62
|
+
- If the runtime credential is missing, start the CrewX server once to create it, or set `CREWX_API_TOKEN` explicitly.
|
|
62
63
|
- A successful response looks like `201 { success: true, data: { id } }`, and the CLI prints the id of the sent notification.
|
|
63
64
|
- On network/HTTP failure, check the server status first.
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,56 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.main = main;
|
|
38
|
-
const fs = __importStar(require("fs"));
|
|
39
|
-
const path = __importStar(require("path"));
|
|
40
|
-
const engine_js_1 = require("./src/engine.js");
|
|
41
|
-
let PKG_VERSION = 'unknown';
|
|
42
|
-
try {
|
|
43
|
-
const _pkgPath = fs.existsSync(path.join(__dirname, 'package.json'))
|
|
44
|
-
? path.join(__dirname, 'package.json')
|
|
45
|
-
: path.join(__dirname, '..', 'package.json');
|
|
46
|
-
const _pkg = JSON.parse(fs.readFileSync(_pkgPath, 'utf-8'));
|
|
47
|
-
if (_pkg?.version)
|
|
48
|
-
PKG_VERSION = String(_pkg.version);
|
|
49
|
-
}
|
|
50
|
-
catch { }
|
|
51
|
-
function printUsage() {
|
|
52
|
-
console.log(`
|
|
53
|
-
@crewx/notify@${PKG_VERSION} - Send an in-app notification to the CrewX dashboard
|
|
2
|
+
"use strict";var y=exports&&exports.__createBinding||(Object.create?(function(t,e,o,n){if(n===void 0)n=o;var i=Object.getOwnPropertyDescriptor(e,o);if(!i||("get"in i?!e.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return e[o]}}}Object.defineProperty(t,n,i)}):(function(t,e,o,n){if(n===void 0)n=o;t[n]=e[o]}));var O=exports&&exports.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:true,value:e})}):function(t,e){t["default"]=e});var p=exports&&exports.__importStar||(function(){var t=function(e){t=Object.getOwnPropertyNames||function(o){var n=[];for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i))n[n.length]=i;return n};return t(e)};return function(e){if(e&&e.__esModule)return e;var o={};if(e!=null){for(var n=t(e),i=0;i<n.length;i++)if(n[i]!=="default")y(o,e,n[i])}O(o,e);return o}})();Object.defineProperty(exports,"__esModule",{value:true});exports.main=_;const l=p(require("fs"));const c=p(require("path"));const E=require("@crewx/shared/crewx-api-credential");const u=require("./src/engine.js");let f="unknown";try{const t=l.existsSync(c.join(__dirname,"package.json"))?c.join(__dirname,"package.json"):c.join(__dirname,"..","package.json");const e=JSON.parse(l.readFileSync(t,"utf-8"));if(e?.version)f=String(e.version)}catch{}function d(){console.log(`
|
|
3
|
+
@crewx/notify@${f} - Send an in-app notification to the CrewX dashboard
|
|
54
4
|
|
|
55
5
|
Usage:
|
|
56
6
|
notify "<title>" [options]
|
|
@@ -63,97 +13,11 @@ Options:
|
|
|
63
13
|
Environment variables:
|
|
64
14
|
CREWX_WORKSPACE Absolute workspace path (required)
|
|
65
15
|
CREWX_ENDPOINT Server URL (default: http://localhost:8150)
|
|
66
|
-
CREWX_API_TOKEN
|
|
16
|
+
CREWX_API_TOKEN Explicit server auth token override
|
|
67
17
|
CREWX_AGENT_ID Producing agent id (optional)
|
|
68
18
|
CREWX_TASK_ID Originating task id (optional)
|
|
69
19
|
CREWX_THREAD_ID Originating thread id (optional)
|
|
70
20
|
|
|
71
21
|
Example:
|
|
72
22
|
notify "Deploy needs approval" --level=warning --body="Staging is green; confirm prod."
|
|
73
|
-
`);
|
|
74
|
-
}
|
|
75
|
-
function showDetailedUsage() {
|
|
76
|
-
const skillMd = path.join(__dirname, '..', 'SKILL.md');
|
|
77
|
-
if (fs.existsSync(skillMd)) {
|
|
78
|
-
process.stdout.write(fs.readFileSync(skillMd, 'utf-8'));
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
printUsage();
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
const BOOLEAN_FLAGS = new Set(['help', 'version']);
|
|
85
|
-
function parseArgs(args) {
|
|
86
|
-
const result = { positional: [], options: {} };
|
|
87
|
-
for (let i = 0; i < args.length; i++) {
|
|
88
|
-
const arg = args[i];
|
|
89
|
-
if (arg === '-h') {
|
|
90
|
-
result.options['help'] = true;
|
|
91
|
-
}
|
|
92
|
-
else if (arg.startsWith('--')) {
|
|
93
|
-
const eqIdx = arg.indexOf('=');
|
|
94
|
-
if (eqIdx !== -1) {
|
|
95
|
-
result.options[arg.slice(2, eqIdx)] = arg.slice(eqIdx + 1);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
const key = arg.slice(2);
|
|
99
|
-
if (!BOOLEAN_FLAGS.has(key)) {
|
|
100
|
-
const next = args[i + 1];
|
|
101
|
-
if (next !== undefined && !next.startsWith('--') && next !== '-h') {
|
|
102
|
-
result.options[key] = next;
|
|
103
|
-
i++;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
result.options[key] = true;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
result.options[key] = true;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
result.positional.push(arg);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return result;
|
|
119
|
-
}
|
|
120
|
-
async function main(inputArgs) {
|
|
121
|
-
const args = inputArgs ?? process.argv.slice(2);
|
|
122
|
-
const { positional, options } = parseArgs(args);
|
|
123
|
-
const [first] = positional;
|
|
124
|
-
if (options['version']) {
|
|
125
|
-
console.log(PKG_VERSION);
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
if (first === 'usage') {
|
|
129
|
-
showDetailedUsage();
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
if (options['help'] || first === 'help') {
|
|
133
|
-
printUsage();
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
const title = first;
|
|
137
|
-
if (!title) {
|
|
138
|
-
console.error('Error: notify requires a title.');
|
|
139
|
-
printUsage();
|
|
140
|
-
process.exit(1);
|
|
141
|
-
}
|
|
142
|
-
const levelRaw = options['level'];
|
|
143
|
-
const level = levelRaw === undefined ? 'info' : String(levelRaw);
|
|
144
|
-
if (!engine_js_1.NOTIFY_LEVELS.includes(level)) {
|
|
145
|
-
console.error(`Error: invalid --level '${level}'. Must be one of: ${engine_js_1.NOTIFY_LEVELS.join(', ')}`);
|
|
146
|
-
process.exit(1);
|
|
147
|
-
}
|
|
148
|
-
const body = typeof options['body'] === 'string' ? options['body'] : undefined;
|
|
149
|
-
const engine = new engine_js_1.NotifyEngine();
|
|
150
|
-
const { id } = await engine.send({ title, level, body });
|
|
151
|
-
console.log(`Notification sent (id: ${id}, level: ${level})`);
|
|
152
|
-
}
|
|
153
|
-
if (require.main === module) {
|
|
154
|
-
main().catch((e) => {
|
|
155
|
-
console.error(e.message);
|
|
156
|
-
process.exit(1);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
//# sourceMappingURL=cli.js.map
|
|
23
|
+
`)}function b(){const t=c.join(__dirname,"..","SKILL.md");if(l.existsSync(t)){process.stdout.write(l.readFileSync(t,"utf-8"))}else{d()}}const S=new Set(["help","version"]);function w(t){const e={positional:[],options:{}};for(let o=0;o<t.length;o++){const n=t[o];if(n==="-h"){e.options["help"]=true}else if(n.startsWith("--")){const i=n.indexOf("=");if(i!==-1){e.options[n.slice(2,i)]=n.slice(i+1)}else{const r=n.slice(2);if(!S.has(r)){const s=t[o+1];if(s!==void 0&&!s.startsWith("--")&&s!=="-h"){e.options[r]=s;o++}else{e.options[r]=true}}else{e.options[r]=true}}}else{e.positional.push(n)}}return e}async function _(t){const e=t??process.argv.slice(2);const{positional:o,options:n}=w(e);const[i]=o;if(n["version"]){console.log(f);return}if(i==="usage"){b();return}if(n["help"]||i==="help"){d();return}const r=i;if(!r){console.error("Error: notify requires a title.");d();process.exit(1)}const s=n["level"];const a=s===void 0?"info":String(s);if(!u.NOTIFY_LEVELS.includes(a)){console.error(`Error: invalid --level '${a}'. Must be one of: ${u.NOTIFY_LEVELS.join(", ")}`);process.exit(1)}const g=typeof n["body"]==="string"?n["body"]:void 0;const h=new u.NotifyEngine;const{id:v}=await h.send({title:r,level:a,body:g});console.log(`Notification sent (id: ${v}, level: ${a})`)}if(require.main===module){_().catch(t=>{console.error(t.message);process.exit(t instanceof E.CrewxCredentialError?t.exitCode:1)})}
|
package/dist/src/engine.d.ts
CHANGED
package/dist/src/engine.js
CHANGED
|
@@ -1,74 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.NotifyEngine = exports.NOTIFY_LEVELS = void 0;
|
|
4
|
-
const DEFAULT_ENDPOINT = 'http://localhost:8150';
|
|
5
|
-
exports.NOTIFY_LEVELS = ['info', 'warning', 'critical'];
|
|
6
|
-
class NotifyEngine {
|
|
7
|
-
get endpoint() {
|
|
8
|
-
return process.env['CREWX_ENDPOINT'] ?? DEFAULT_ENDPOINT;
|
|
9
|
-
}
|
|
10
|
-
async send(opts) {
|
|
11
|
-
const title = typeof opts.title === 'string' ? opts.title.trim() : '';
|
|
12
|
-
if (!title) {
|
|
13
|
-
throw new Error('notify requires a title.\nUsage: crewx notify "<title>" [--level=info|warning|critical] [--body="..."]');
|
|
14
|
-
}
|
|
15
|
-
const level = opts.level ?? 'info';
|
|
16
|
-
if (!exports.NOTIFY_LEVELS.includes(level)) {
|
|
17
|
-
throw new Error(`Invalid level '${level}'. Must be one of: ${exports.NOTIFY_LEVELS.join(', ')}`);
|
|
18
|
-
}
|
|
19
|
-
const workspace = process.env['CREWX_WORKSPACE'] ?? '';
|
|
20
|
-
if (!workspace) {
|
|
21
|
-
throw new Error('CREWX_WORKSPACE is not set. The notify CLI needs the absolute workspace path to route the notification.');
|
|
22
|
-
}
|
|
23
|
-
const body = {
|
|
24
|
-
workspace,
|
|
25
|
-
title,
|
|
26
|
-
level,
|
|
27
|
-
source: 'agent',
|
|
28
|
-
};
|
|
29
|
-
if (opts.body)
|
|
30
|
-
body['body'] = opts.body;
|
|
31
|
-
if (opts.metadata)
|
|
32
|
-
body['metadata'] = opts.metadata;
|
|
33
|
-
const agentId = process.env['CREWX_AGENT_ID'];
|
|
34
|
-
const taskId = process.env['CREWX_TASK_ID'];
|
|
35
|
-
const threadId = process.env['CREWX_THREAD_ID'];
|
|
36
|
-
if (agentId)
|
|
37
|
-
body['agentId'] = agentId;
|
|
38
|
-
if (taskId)
|
|
39
|
-
body['taskId'] = taskId;
|
|
40
|
-
if (threadId)
|
|
41
|
-
body['threadId'] = threadId;
|
|
42
|
-
const endpoint = this.endpoint;
|
|
43
|
-
const apiToken = process.env['CREWX_API_TOKEN'] ?? '';
|
|
44
|
-
const headers = { 'Content-Type': 'application/json' };
|
|
45
|
-
if (apiToken)
|
|
46
|
-
headers['Authorization'] = `Bearer ${apiToken}`;
|
|
47
|
-
let res;
|
|
48
|
-
try {
|
|
49
|
-
res = await fetch(`${endpoint}/api/v1/notifications`, {
|
|
50
|
-
method: 'POST',
|
|
51
|
-
headers,
|
|
52
|
-
body: JSON.stringify(body),
|
|
53
|
-
signal: AbortSignal.timeout(15000),
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
catch (err) {
|
|
57
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
58
|
-
throw new Error(`Server connection failed: ${msg}\nCheck that the server is running (${endpoint})`);
|
|
59
|
-
}
|
|
60
|
-
if (!res.ok) {
|
|
61
|
-
const data = (await res.json().catch(() => ({})));
|
|
62
|
-
if (res.status === 401 || res.status === 403) {
|
|
63
|
-
throw new Error(`Notification rejected (${res.status}): authentication failed. ` +
|
|
64
|
-
'For a remote server set CREWX_API_TOKEN; localhost needs no token.');
|
|
65
|
-
}
|
|
66
|
-
throw new Error(`Notification failed (${res.status}): ${JSON.stringify(data)}`);
|
|
67
|
-
}
|
|
68
|
-
const payload = (await res.json().catch(() => ({})));
|
|
69
|
-
const id = payload?.data?.id ?? 'unknown';
|
|
70
|
-
return { id };
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.NotifyEngine = NotifyEngine;
|
|
74
|
-
//# sourceMappingURL=engine.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NotifyEngine=exports.NOTIFY_LEVELS=void 0;const l=require("@crewx/shared/crewx-api-credential");const _="http://localhost:8150";exports.NOTIFY_LEVELS=["info","warning","critical"];class g{get endpoint(){return process.env["CREWX_ENDPOINT"]??_}async send(e){const r=typeof e.title==="string"?e.title.trim():"";if(!r){throw new Error('notify requires a title.\nUsage: crewx notify "<title>" [--level=info|warning|critical] [--body="..."]')}const o=e.level??"info";if(!exports.NOTIFY_LEVELS.includes(o)){throw new Error(`Invalid level '${o}'. Must be one of: ${exports.NOTIFY_LEVELS.join(", ")}`)}const a=process.env["CREWX_WORKSPACE"]??"";if(!a){throw new Error("CREWX_WORKSPACE is not set. The notify CLI needs the absolute workspace path to route the notification.")}const n={workspace:a,title:r,level:o,source:"agent"};if(e.body)n["body"]=e.body;if(e.metadata)n["metadata"]=e.metadata;const s=process.env["CREWX_AGENT_ID"];const c=process.env["CREWX_TASK_ID"];const d=process.env["CREWX_THREAD_ID"];if(s)n["agentId"]=s;if(c)n["taskId"]=c;if(d)n["threadId"]=d;const f=this.endpoint;const E=(0,l.resolveCrewxApiCredential)("notify");const h={"Content-Type":"application/json",...(0,l.authorizationHeader)(E)};let t;try{t=await fetch(`${f}/api/v1/notifications`,{method:"POST",headers:h,body:JSON.stringify(n),signal:AbortSignal.timeout(15e3)})}catch(i){const y=i instanceof Error?i.message:String(i);throw new Error(`Server connection failed: ${y}
|
|
2
|
+
Check that the server is running (${f})`)}if(!t.ok){const i=await t.json().catch(()=>({}));if(t.status===401||t.status===403){throw new Error(`Notification rejected (${t.status}): authentication failed. Set CREWX_API_TOKEN or start the CrewX server once (creates ~/.crewx/auth/runtime/notify.token).`)}throw new Error(`Notification failed (${t.status}): ${JSON.stringify(i)}`)}const w=await t.json().catch(()=>({}));const u=w?.data?.id??"unknown";return{id:u}}}exports.NotifyEngine=g;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crewx/notify",
|
|
3
|
-
"version": "0.1.0-rc.
|
|
3
|
+
"version": "0.1.0-rc.170",
|
|
4
4
|
"description": "Notification CLI for CrewX agents — POST an in-app notification to the dashboard",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/src/engine.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@crewx/shared": "0.0.6"
|
|
35
|
+
"@crewx/shared": "0.0.6-rc.114"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^20.0.0",
|
package/dist/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAuFA,wBAAsB,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC9D"}
|
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFA,oBAuCC;AA5HD,uCAAyB;AACzB,2CAA6B;AAC7B,+CAA8D;AAE9D,IAAI,WAAW,GAAG,SAAS,CAAC;AAC5B,IAAI,CAAC;IACH,MAAM,QAAQ,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;QAClE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC;QACtC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,IAAI,CAA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AAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,YAAY,KAAK,GAAG,CAAC,CAAC;AAChE,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAQ,EAAE,EAAE;QACxB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/src/engine.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/engine.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,0CAA2C,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,MAAM,WAAW,WAAW;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;CACZ;AAaD,qBAAa,YAAY;IACvB,OAAO,KAAK,QAAQ,GAEnB;IAEK,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CA4EnD"}
|
package/dist/src/engine.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/engine.ts"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAGpC,QAAA,aAAa,GAAG,CAAC,MAAM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