@appport/runtime 0.1.0
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 +17 -0
- package/cli.js +14 -0
- package/index.d.ts +11 -0
- package/index.js +6 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# AppPort Runtime
|
|
2
|
+
|
|
3
|
+
The public, contract-driven entry point for AppPort applications.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @appport/runtime
|
|
7
|
+
npx appport init --use api,webhooks,jobs
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```js
|
|
11
|
+
import { appport } from '@appport/runtime';
|
|
12
|
+
|
|
13
|
+
const app = await appport();
|
|
14
|
+
await app.api.keys.createApiKey(/* ... */);
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`appport()` reads `appport.toml` and initializes only its declared capabilities. The runtime installs its CLI and capability implementation transitively.
|
package/cli.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
import { runCli } from '@appport/services/cli';
|
|
5
|
+
|
|
6
|
+
runCli(process.argv.slice(2)).then(
|
|
7
|
+
(code) => {
|
|
8
|
+
process.exitCode = code;
|
|
9
|
+
},
|
|
10
|
+
(error) => {
|
|
11
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
12
|
+
process.exitCode = 1;
|
|
13
|
+
},
|
|
14
|
+
);
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
appport,
|
|
3
|
+
CapabilityNotDeclaredError,
|
|
4
|
+
capabilityRegistry,
|
|
5
|
+
createCapabilityPlan,
|
|
6
|
+
type AppPortApplication,
|
|
7
|
+
type AppPortApiCapability,
|
|
8
|
+
type AppPortCapabilityName,
|
|
9
|
+
type AppPortOptions,
|
|
10
|
+
type CapabilityPlan,
|
|
11
|
+
} from '@appport/services';
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@appport/runtime",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Contract-driven AppPort application runtime",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"import": "./index.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"appport": "./cli.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"cli.js",
|
|
17
|
+
"index.js",
|
|
18
|
+
"index.d.ts",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@appport/services": "^0.2.0"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"appport",
|
|
26
|
+
"runtime",
|
|
27
|
+
"feltdb"
|
|
28
|
+
],
|
|
29
|
+
"license": "ISC"
|
|
30
|
+
}
|