Skip to content

Commit 4afb9e7

Browse files
committed
feat: Rewrite for pack architecture
1 parent 4e89671 commit 4afb9e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2400
-3803
lines changed
-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
scripts-prepend-node-path = true
22
link-workspace-packages = true
3-
fund = false
43
loglevel = "error"
File renamed without changes.

.tool-versions

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
nodejs 18.19.0
2-
pnpm 8.11.0
3-
python 3.12.4
1+
nodejs 20.16.0

.xo-config.cjs

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = {
22
prettier: true,
33
space: true,
44
nodeVersion: false,
5+
ignore: ["vendor/**"],
56
rules: {
67
"@typescript-eslint/naming-convention": "off",
78
"@typescript-eslint/no-floating-promises": "off",
@@ -37,6 +38,15 @@ module.exports = {
3738
"unicorn/filename-case": "off",
3839
"unicorn/no-array-callback-reference": "off",
3940
"unicorn/no-array-method-this-argument": "off",
41+
"unicorn/prevent-abbreviations": [
42+
"error",
43+
{
44+
allowList: {
45+
args: true,
46+
env: true,
47+
},
48+
},
49+
],
4050
},
4151
plugins: [],
4252
};
File renamed without changes.

README.md

+32-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,38 @@
1-
# @taskless/shim
1+
# @taskless/loader
22

3-
Interceptor libraries for L7 Observability
3+
Take control of your third party APIs
44

5-
# Latest Documentation
5+
# Getting Started
66

7-
- <img src="https://img.shields.io/badge/node.js-empty?style=flat&logo=nodedotjs&logoColor=5FA04E&labelColor=222222&color=5FA04E"/> JS/TS `@taskless/shim`
8-
- [docs](https://github.com/taskless/shim/blob/main/packages/js/README.md)
9-
- [example - local logs](https://github.com/taskless/shim/blob/main/packages/js/examples/localLogs.README.md)
10-
- <img src="https://img.shields.io/badge/python-empty?style=flat&logo=python&logoColor=306998&labelColor=222222&color=306998" /> python `pypi tbd`
11-
- [docs](https://github.com/taskless/shim/blob/main/packages/py/README.md)
12-
- [example - local logs](https://github.com/taskless/shim/blob/main/packages/py/examples/local_logs.README.md)
7+
You'll need your API key from taskless.io to use Taskless' dynamic pack loading, remote cofiguration, and analytic packages. If you don't have an API key, you can sign up for free at [taskless.io](https://taskless.io).
8+
9+
```bash
10+
npm install @taskless/loader
11+
# or
12+
yarn add @taskless/loader
13+
# or
14+
pnpm add @taskless/loader
15+
```
16+
17+
Once you've got access to the Taskless loader, getting telemetry on taskless.io is as easy as:
18+
19+
```bash
20+
TASKLESS_API_KEY="your key" node --import="@taskless/loader" start.js
21+
```
22+
23+
# Advanced Features
24+
25+
## Programatic API
26+
27+
(coming soon)
28+
29+
## Local (No Network) Mode
30+
31+
Have a favorite log drain? Want to test locally? No problem. You can use the `@taskless/loader` package to test locally.
32+
33+
```bash
34+
TASKLESS_LOCAL_MODE=1 node --import="@taskless/loader" start.js
35+
```
1336

1437
# License
1538

File renamed without changes.
File renamed without changes.

package.json

+54-4
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,81 @@
11
{
22
"private": true,
3-
"name": "@taskless/~shims",
4-
"description": "Taskless - Shim Library Root",
5-
"version": "0.0.1",
3+
"name": "@taskless/loader",
4+
"description": "Taskless Loader - Take control of your third party APIs",
5+
"version": "0.0.2",
66
"author": "Taskless",
77
"license": "Apache-2.0",
88
"scripts": {
9+
"build": "vite build",
10+
"codegen": "tsx ./typebox/generate.ts",
911
"husky": "husky",
1012
"lint-staged": "lint-staged",
1113
"prepare": "husky",
1214
"prettier": "prettier",
1315
"syncpack": "syncpack",
16+
"test": "vitest",
1417
"xo": "xo"
1518
},
1619
"type": "module",
1720
"main": "dist/index.js",
18-
"dependencies": {},
21+
"exports": {
22+
".": {
23+
"types": "./dist/index.d.ts",
24+
"import": "./dist/index.js",
25+
"require": "./dist/index.cjs"
26+
},
27+
"./node": {
28+
"types": "./dist/node.d.ts",
29+
"import": "./dist/node.js",
30+
"require": "./dist/node.cjs"
31+
}
32+
},
33+
"files": [
34+
"dist",
35+
"src",
36+
"README.md",
37+
"LICENSE",
38+
"package.json"
39+
],
40+
"tsup": {
41+
"entry": [
42+
"src/index.ts",
43+
"src/node.ts"
44+
],
45+
"format": "esm",
46+
"splitting": false,
47+
"sourcemap": true,
48+
"clean": true,
49+
"dts": true
50+
},
51+
"dependencies": {
52+
"msw": "^2.3.5",
53+
"ts-dedent": "^2.2.0",
54+
"uint8array-extras": "^1.4.0",
55+
"uuid": "^10.0.0",
56+
"wasmoon": "^1.16.0"
57+
},
1958
"devDependencies": {
2059
"@commitlint/cli": "^19.3.0",
2160
"@commitlint/config-conventional": "^19.2.2",
61+
"@types/js-yaml": "^4.0.9",
2262
"@types/node": "^20.12.12",
63+
"@types/uuid": "^10.0.0",
64+
"execa": "^9.3.0",
2365
"husky": "^9.0.11",
66+
"js-yaml": "^4.1.0",
2467
"lint-staged": "^15.2.4",
2568
"prettier": "^3.2.5",
2669
"shx": "^0.3.4",
2770
"syncpack": "^12.3.2",
71+
"tsx": "^4.16.5",
72+
"type-fest": "^4.23.0",
2873
"typescript": "^5.4.5",
74+
"vite": "^5.3.5",
75+
"vite-plugin-dts": "^4.0.1",
76+
"vite-plugin-externalize-deps": "^0.8.0",
77+
"vite-tsconfig-paths": "^4.3.2",
78+
"vitest": "^2.0.5",
2979
"xo": "^0.58.0"
3080
},
3181
"keywords": []

packages/js/.c8rc.json

-3
This file was deleted.

packages/js/.xo-config.cjs

-5
This file was deleted.

packages/js/README.md

-60
This file was deleted.

packages/js/ava.config.js

-9
This file was deleted.

packages/js/package.json

-76
This file was deleted.

packages/js/src/index.ts

-11
This file was deleted.

0 commit comments

Comments
 (0)