@owlmeans/server-entrypoint 0.1.18-rc.37 → 0.1.18-rc.39
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/README.md +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/server-entrypoint/SKILL.md +1 -1
- package/build/protocol.d.ts +3 -4
- package/build/protocol.d.ts.map +1 -1
- package/build/protocol.js.map +1 -1
- package/build/types.local.d.ts +4 -0
- package/build/types.local.d.ts.map +1 -0
- package/build/types.local.js +2 -0
- package/build/types.local.js.map +1 -0
- package/package.json +6 -6
- package/src/protocol.ts +2 -8
- package/src/types.local.ts +6 -0
- package/build/entrypoint.d.ts +0 -6
- package/build/entrypoint.d.ts.map +0 -1
- package/build/entrypoint.js +0 -38
- package/build/entrypoint.js.map +0 -1
- package/build/helper.d.ts +0 -5
- package/build/helper.d.ts.map +0 -1
- package/build/helper.js +0 -25
- package/build/helper.js.map +0 -1
- package/build/utils/entrypoint.d.ts +0 -3
- package/build/utils/entrypoint.d.ts.map +0 -1
- package/build/utils/entrypoint.js +0 -3
- package/build/utils/entrypoint.js.map +0 -1
- package/build/utils/helper.d.ts +0 -2
- package/build/utils/helper.d.ts.map +0 -1
- package/build/utils/helper.js +0 -2
- package/build/utils/helper.js.map +0 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ and a browser app binds the same protocols with `@owlmeans/client-entrypoint` in
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
bun add @owlmeans/server-entrypoint@^0.1.18-rc.
|
|
13
|
+
bun add @owlmeans/server-entrypoint@^0.1.18-rc.39
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Concepts
|
|
@@ -154,7 +154,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
|
|
|
154
154
|
your project's skill store (`.agents/skills/`):
|
|
155
155
|
|
|
156
156
|
```sh
|
|
157
|
-
npx @owlmeans/agent-skills@^0.1.18-rc.
|
|
157
|
+
npx @owlmeans/agent-skills@^0.1.18-rc.48
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/server-entrypoint",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-10-
|
|
4
|
+
"version": "0.1.18-rc.39",
|
|
5
|
+
"generatedAt": "2026-10-05T08:32:19.117Z",
|
|
6
6
|
"canonicalRepo": "https://github.com/owlmeans/common",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
@@ -7,7 +7,7 @@ user-invocable: false
|
|
|
7
7
|
|
|
8
8
|
# @owlmeans/server-entrypoint
|
|
9
9
|
|
|
10
|
-
**Install:** `bun add @owlmeans/server-entrypoint@^0.1.18-rc.
|
|
10
|
+
**Install:** `bun add @owlmeans/server-entrypoint@^0.1.18-rc.39`
|
|
11
11
|
|
|
12
12
|
Bind the imported protocol object to the implementation that serves it:
|
|
13
13
|
|
package/build/protocol.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { BoundEntrypointHandler, EntrypointOptions,
|
|
3
|
-
type ServerBinding
|
|
1
|
+
import { type EntrypointProtocolDeclaration } from '@owlmeans/entrypoint';
|
|
2
|
+
import type { BoundEntrypointHandler, EntrypointOptions, ServerProtocolEntrypoint } from './types.js';
|
|
3
|
+
import type { ServerBinding } from './types.local.js';
|
|
4
4
|
/** Bind one immutable protocol and, when present, its protocol-bound implementation. */
|
|
5
5
|
export declare const bind: <Protocol extends EntrypointProtocolDeclaration>(protocol: Protocol, implementation?: ServerBinding<Protocol>, options?: EntrypointOptions<object>) => ServerProtocolEntrypoint<Protocol>;
|
|
6
6
|
/** Bind a flat declaration collection and pair each protocol with its own implementation. */
|
|
7
7
|
export declare const bindAll: <Protocol extends EntrypointProtocolDeclaration>(declarations: readonly Protocol[], implementations?: readonly BoundEntrypointHandler<Protocol>[]) => ServerProtocolEntrypoint<Protocol>[];
|
|
8
|
-
export {};
|
|
9
8
|
//# sourceMappingURL=protocol.d.ts.map
|
package/build/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,KAAK,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AAEvH,OAAO,KAAK,EACV,sBAAsB,EAAE,iBAAiB,EACzC,wBAAwB,EACzB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAyBrD,wFAAwF;AACxF,eAAO,MAAM,IAAI,GAAI,QAAQ,SAAS,6BAA6B,YACvD,QAAQ,mBACD,aAAa,CAAC,QAAQ,CAAC,YAC9B,iBAAiB,CAAC,MAAM,CAAC,KAClC,wBAAwB,CAAC,QAAQ,CAWnC,CAAA;AAED,6FAA6F;AAC7F,eAAO,MAAM,OAAO,GAAI,QAAQ,SAAS,6BAA6B,gBACtD,SAAS,QAAQ,EAAE,oBAChB,SAAS,sBAAsB,CAAC,QAAQ,CAAC,EAAE,KAC3D,wBAAwB,CAAC,QAAQ,CAAC,EAEpC,CAAA"}
|
package/build/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAA6D,MAAM,sBAAsB,CAAA;AACvH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wFAAwF;AACxF,MAAM,CAAC,MAAM,IAAI,GAAG,CAClB,QAAkB,EAClB,cAAwC,EACxC,OAAmC,EACC,EAAE;IACtC,MAAM,OAAO,GAAG,OAAO,cAAc,KAAK,UAAU;QAClD,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,cAAc,EAAE,IAAI,CAAA;IACxB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,0BAA0B,CACpD,qBAAqB,CAAC,QAAQ,CAAC,EAC/B,OAAO,EACP,OAAO,CACR,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAA;IAEhB,OAAO,KAA2C,CAAA;AACpD,CAAC,CAAA;AAED,6FAA6F;AAC7F,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,YAAiC,EACjC,eAAe,GAAgD,EAAE,EAC3B,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CACxE,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CACnG,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { EntrypointProtocolDeclaration } from '@owlmeans/entrypoint';
|
|
2
|
+
import type { BoundEntrypointHandler, RefedEntrypointHandler } from './types.js';
|
|
3
|
+
export type ServerBinding<Protocol extends EntrypointProtocolDeclaration> = BoundEntrypointHandler<Protocol> | RefedEntrypointHandler;
|
|
4
|
+
//# sourceMappingURL=types.local.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.d.ts","sourceRoot":"","sources":["../src/types.local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEhF,MAAM,MAAM,aAAa,CAAC,QAAQ,SAAS,6BAA6B,IACpE,sBAAsB,CAAC,QAAQ,CAAC,GAChC,sBAAsB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.local.js","sourceRoot":"","sources":["../src/types.local.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@owlmeans/server-entrypoint",
|
|
3
|
-
"version": "0.1.18-rc.
|
|
3
|
+
"version": "0.1.18-rc.39",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
25
|
-
"@owlmeans/entrypoint": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/route": "^0.1.18-rc.
|
|
27
|
-
"@owlmeans/server-route": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/context": "^0.1.18-rc.33",
|
|
25
|
+
"@owlmeans/entrypoint": "^0.1.18-rc.40",
|
|
26
|
+
"@owlmeans/route": "^0.1.18-rc.34",
|
|
27
|
+
"@owlmeans/server-route": "^0.1.18-rc.33"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@owlmeans/dep-config": "workspace:*",
|
|
31
|
-
"@types/node": "^26.
|
|
31
|
+
"@types/node": "^26.6.4",
|
|
32
32
|
"nodemon": "^3.1.14",
|
|
33
33
|
"typescript": "^7.0.2"
|
|
34
34
|
},
|
package/src/protocol.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { materializeEntrypoint } from '@owlmeans/entrypoint'
|
|
2
|
-
import type {
|
|
3
|
-
CommonEntrypoint, EntrypointProtocolDeclaration,
|
|
4
|
-
} from '@owlmeans/entrypoint'
|
|
1
|
+
import { materializeEntrypoint, type CommonEntrypoint, type EntrypointProtocolDeclaration } from '@owlmeans/entrypoint'
|
|
5
2
|
import { isServerRouteModel, route } from '@owlmeans/server-route'
|
|
6
3
|
import type {
|
|
7
4
|
BoundEntrypointHandler, EntrypointOptions, EntrypointRef, RefedEntrypointHandler, ServerEntrypoint,
|
|
8
5
|
ServerProtocolEntrypoint,
|
|
9
6
|
} from './types.js'
|
|
10
|
-
|
|
11
|
-
type ServerBinding<Protocol extends EntrypointProtocolDeclaration> =
|
|
12
|
-
| BoundEntrypointHandler<Protocol>
|
|
13
|
-
| RefedEntrypointHandler
|
|
7
|
+
import type { ServerBinding } from './types.local.js'
|
|
14
8
|
|
|
15
9
|
/** Attach a server implementation to an entrypoint materialized from a protocol declaration. */
|
|
16
10
|
const bindMaterializedEntrypoint = <R>(
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EntrypointProtocolDeclaration } from '@owlmeans/entrypoint'
|
|
2
|
+
import type { BoundEntrypointHandler, RefedEntrypointHandler } from './types.js'
|
|
3
|
+
|
|
4
|
+
export type ServerBinding<Protocol extends EntrypointProtocolDeclaration> =
|
|
5
|
+
| BoundEntrypointHandler<Protocol>
|
|
6
|
+
| RefedEntrypointHandler
|
package/build/entrypoint.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ServerRouteModel } from '@owlmeans/server-route';
|
|
2
|
-
import type { ServerEntrypoint, EntrypointOptions, RefedEntrypointHandler } from './types.js';
|
|
3
|
-
import type { CommonEntrypoint } from '@owlmeans/entrypoint';
|
|
4
|
-
import type { CommonRouteModel } from '@owlmeans/route';
|
|
5
|
-
export declare const entrypoint: <R>(arg: CommonEntrypoint | ServerRouteModel<R> | CommonRouteModel, handler?: RefedEntrypointHandler<R>, opts?: EntrypointOptions<R>) => ServerEntrypoint<R>;
|
|
6
|
-
//# sourceMappingURL=entrypoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAiB,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAG5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAIvD,eAAO,MAAM,UAAU,GAAI,CAAC,EAC1B,KAAK,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,gBAAgB,EAAE,UAAU,sBAAsB,CAAC,CAAC,CAAC,EAAE,OAAO,iBAAiB,CAAC,CAAC,CAAC,KAC/H,gBAAgB,CAAC,CAAC,CAuCpB,CAAA"}
|
package/build/entrypoint.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { isEntrypoint, makeCommonEntrypoint } from './utils/entrypoint.js';
|
|
2
|
-
import { isServerRouteModel, route } from '@owlmeans/server-route';
|
|
3
|
-
import { prependBase } from '@owlmeans/route/utils';
|
|
4
|
-
export const entrypoint = (arg, handler, opts) => {
|
|
5
|
-
const entrypointHandle = { ref: undefined };
|
|
6
|
-
let _entrypoint;
|
|
7
|
-
if (isEntrypoint(arg)) {
|
|
8
|
-
const routeModel = route(arg.route, opts?.intermediate ?? false, opts?.routeOptions);
|
|
9
|
-
_entrypoint = arg;
|
|
10
|
-
_entrypoint.route = routeModel;
|
|
11
|
-
_entrypoint.filter = opts?.filter ?? arg.filter;
|
|
12
|
-
_entrypoint.guards = [...(arg.guards ?? []), ...(opts?.guards ?? [])];
|
|
13
|
-
_entrypoint.gate = opts?.gate ?? arg.gate;
|
|
14
|
-
_entrypoint.gateParams = opts?.gateParams ?? arg.gateParams;
|
|
15
|
-
}
|
|
16
|
-
else if (isServerRouteModel(arg)) {
|
|
17
|
-
_entrypoint = makeCommonEntrypoint(arg, { ...opts });
|
|
18
|
-
_entrypoint.route = arg;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
const _route = route(arg, opts?.intermediate ?? false, opts?.routeOptions);
|
|
22
|
-
_entrypoint = makeCommonEntrypoint(_route, { ...opts });
|
|
23
|
-
_entrypoint.route = _route;
|
|
24
|
-
}
|
|
25
|
-
_entrypoint.fixer = opts?.fixer;
|
|
26
|
-
if (handler != null) {
|
|
27
|
-
_entrypoint.handle = handler(entrypointHandle);
|
|
28
|
-
}
|
|
29
|
-
_entrypoint.reinitializeContext = (context) => {
|
|
30
|
-
const newEntrypoint = entrypoint(arg, handler, opts);
|
|
31
|
-
newEntrypoint.ctx = context;
|
|
32
|
-
return newEntrypoint;
|
|
33
|
-
};
|
|
34
|
-
_entrypoint.getPath = () => prependBase(_entrypoint.route.route);
|
|
35
|
-
entrypointHandle.ref = _entrypoint;
|
|
36
|
-
return _entrypoint;
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=entrypoint.js.map
|
package/build/entrypoint.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../src/entrypoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAIlE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,GAA8D,EAAE,OAAmC,EAAE,IAA2B,EAC3G,EAAE;IACvB,MAAM,gBAAgB,GAAqB,EAAE,GAAG,EAAE,SAAS,EAAE,CAAA;IAE7D,IAAI,WAAgC,CAAA;IAEpC,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;QACtB,MAAM,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,IAAI,KAAK,E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AAE,OAAO,EAAE,IAAI,CAAC,CAAA;QACpD,aAAa,CAAC,GAAG,GAAG,OAAO,CAAA;QAE3B,OAAO,aAAkB,CAAA;IAC3B,CAAC,CAAA;IAED,WAAW,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAEhE,gBAAgB,CAAC,GAAG,GAAG,WAAW,CAAA;IAElC,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA"}
|
package/build/helper.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ServerEntrypoint, EntrypointOptions, RefedEntrypointHandler } from './types.js';
|
|
2
|
-
import type { CommonEntrypoint } from '@owlmeans/entrypoint';
|
|
3
|
-
export declare const elevate: <R>(entrypoints: (CommonEntrypoint | ServerEntrypoint<R>)[], alias: string, handler?: RefedEntrypointHandler<R> | boolean | EntrypointOptions<R>, opts?: boolean | EntrypointOptions<R>) => ServerEntrypoint<R>[];
|
|
4
|
-
export declare const guard: <R>(guard: string, opts?: EntrypointOptions<R>) => EntrypointOptions<R>;
|
|
5
|
-
//# sourceMappingURL=helper.d.ts.map
|
package/build/helper.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAI7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,eAAO,MAAM,OAAO,GAAI,CAAC,EACvB,aAAa,CAAC,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,EACvD,OAAO,MAAM,EACb,UAAU,sBAAsB,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,EACpE,OAAO,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,KACpC,gBAAgB,CAAC,CAAC,CAAC,EAuBrB,CAAA;AAED,eAAO,MAAM,KAAK,GAAI,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,iBAAiB,CAAC,CAAC,CAAC,KAAG,iBAAiB,CAAC,CAAC,CACjD,CAAA"}
|
package/build/helper.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { entrypoint } from './entrypoint.js';
|
|
2
|
-
import { isServerRouteModel } from '@owlmeans/server-route';
|
|
3
|
-
import { createBasicGuard } from './utils/helper.js';
|
|
4
|
-
export const elevate = (entrypoints, alias, handler, opts) => {
|
|
5
|
-
const idx = entrypoints.findIndex(({ route }) => route.route.alias === alias);
|
|
6
|
-
if (idx === -1) {
|
|
7
|
-
throw new SyntaxError(`Entrypoint with alias ${alias} not present`);
|
|
8
|
-
}
|
|
9
|
-
if (typeof handler === 'boolean') {
|
|
10
|
-
opts = handler;
|
|
11
|
-
handler = undefined;
|
|
12
|
-
}
|
|
13
|
-
if (typeof handler === 'object' && typeof handler !== 'function') {
|
|
14
|
-
opts = handler;
|
|
15
|
-
handler = undefined;
|
|
16
|
-
}
|
|
17
|
-
const force = typeof opts === 'object' && opts.force;
|
|
18
|
-
if (isServerRouteModel(entrypoints[idx].route) && !force) {
|
|
19
|
-
throw new SyntaxError(`Entrypoint with alias ${alias} is already elevated`);
|
|
20
|
-
}
|
|
21
|
-
entrypoints[idx] = entrypoint(entrypoints[idx], handler, typeof opts === 'boolean' ? { intermediate: opts } : opts);
|
|
22
|
-
return entrypoints;
|
|
23
|
-
};
|
|
24
|
-
export const guard = (guard, opts) => ({ ...createBasicGuard(guard, opts) });
|
|
25
|
-
//# sourceMappingURL=helper.js.map
|
package/build/helper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAA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7C,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG,CAAI,KAAa,EAAE,IAA2B,EAAwB,EAAE,CAC3F,CAAC,EAAE,GAAG,gBAAgB,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entrypoint.js","sourceRoot":"","sources":["../../src/utils/entrypoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA"}
|
package/build/utils/helper.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/utils/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
|
package/build/utils/helper.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../src/utils/helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,gBAAgB,EAAE,MAAM,sBAAsB,CAAA"}
|