@elevasis/sdk 0.3.1 → 0.3.2
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/dist/cli.cjs +52 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -40704,9 +40704,11 @@ var import_promises2 = require("fs/promises");
|
|
|
40704
40704
|
var SCAFFOLD_FILES = [
|
|
40705
40705
|
"elevasis.config.ts",
|
|
40706
40706
|
"package.json",
|
|
40707
|
+
"pnpm-workspace.yaml",
|
|
40707
40708
|
"tsconfig.json",
|
|
40708
40709
|
".env",
|
|
40709
40710
|
".gitignore",
|
|
40711
|
+
"README.md",
|
|
40710
40712
|
"src/index.ts"
|
|
40711
40713
|
];
|
|
40712
40714
|
function registerInitCommand(program3) {
|
|
@@ -40735,9 +40737,11 @@ function registerInitCommand(program3) {
|
|
|
40735
40737
|
const files = {
|
|
40736
40738
|
"elevasis.config.ts": configTemplate(orgSlug),
|
|
40737
40739
|
"package.json": packageJsonTemplate(orgSlug),
|
|
40740
|
+
"pnpm-workspace.yaml": pnpmWorkspaceTemplate(),
|
|
40738
40741
|
"tsconfig.json": tsconfigTemplate(),
|
|
40739
40742
|
".env": envTemplate(),
|
|
40740
40743
|
".gitignore": gitignoreTemplate(),
|
|
40744
|
+
"README.md": readmeTemplate(orgSlug),
|
|
40741
40745
|
"src/index.ts": starterTemplate()
|
|
40742
40746
|
};
|
|
40743
40747
|
for (const [filePath, content] of Object.entries(files)) {
|
|
@@ -40749,7 +40753,7 @@ function registerInitCommand(program3) {
|
|
|
40749
40753
|
if (directory) {
|
|
40750
40754
|
console.log(source_default.gray(` cd ${directory}`));
|
|
40751
40755
|
}
|
|
40752
|
-
console.log(source_default.gray("
|
|
40756
|
+
console.log(source_default.gray(" pnpm install"));
|
|
40753
40757
|
console.log(source_default.gray(" # Add your ELEVASIS_API_KEY to .env"));
|
|
40754
40758
|
console.log(source_default.gray(" elevasis check"));
|
|
40755
40759
|
console.log(source_default.gray(" elevasis deploy"));
|
|
@@ -40785,6 +40789,10 @@ function packageJsonTemplate(organization) {
|
|
|
40785
40789
|
}
|
|
40786
40790
|
}, null, 2) + "\n";
|
|
40787
40791
|
}
|
|
40792
|
+
function pnpmWorkspaceTemplate() {
|
|
40793
|
+
return `packages: []
|
|
40794
|
+
`;
|
|
40795
|
+
}
|
|
40788
40796
|
function tsconfigTemplate() {
|
|
40789
40797
|
return JSON.stringify({
|
|
40790
40798
|
compilerOptions: {
|
|
@@ -40815,6 +40823,49 @@ function gitignoreTemplate() {
|
|
|
40815
40823
|
dist/
|
|
40816
40824
|
`;
|
|
40817
40825
|
}
|
|
40826
|
+
function readmeTemplate(organization) {
|
|
40827
|
+
return `# ${organization}
|
|
40828
|
+
|
|
40829
|
+
An [Elevasis](https://elevasis.io) project built with the \`@elevasis/sdk\`.
|
|
40830
|
+
|
|
40831
|
+
## Setup
|
|
40832
|
+
|
|
40833
|
+
\`\`\`bash
|
|
40834
|
+
pnpm install
|
|
40835
|
+
\`\`\`
|
|
40836
|
+
|
|
40837
|
+
Add your API key to \`.env\`:
|
|
40838
|
+
|
|
40839
|
+
\`\`\`
|
|
40840
|
+
ELEVASIS_API_KEY=sk_...
|
|
40841
|
+
\`\`\`
|
|
40842
|
+
|
|
40843
|
+
## Development
|
|
40844
|
+
|
|
40845
|
+
\`\`\`bash
|
|
40846
|
+
# Validate resources (checks schemas, config, and structure)
|
|
40847
|
+
elevasis check
|
|
40848
|
+
|
|
40849
|
+
# Deploy to the platform
|
|
40850
|
+
elevasis deploy
|
|
40851
|
+
|
|
40852
|
+
# Execute a resource
|
|
40853
|
+
elevasis exec <resourceId> --input '{"key": "value"}'
|
|
40854
|
+
|
|
40855
|
+
# List deployed resources
|
|
40856
|
+
elevasis resources
|
|
40857
|
+
|
|
40858
|
+
# View execution history
|
|
40859
|
+
elevasis executions <resourceId>
|
|
40860
|
+
\`\`\`
|
|
40861
|
+
|
|
40862
|
+
## Project Structure
|
|
40863
|
+
|
|
40864
|
+
- \`elevasis.config.ts\` -- Organization config
|
|
40865
|
+
- \`src/index.ts\` -- Resource definitions (workflows, agents)
|
|
40866
|
+
- \`.env\` -- API key and environment variables
|
|
40867
|
+
`;
|
|
40868
|
+
}
|
|
40818
40869
|
function starterTemplate() {
|
|
40819
40870
|
return `import type { WorkflowDefinition, OrganizationResources } from '@elevasis/sdk'
|
|
40820
40871
|
import { z } from 'zod'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "SDK for building Elevasis organization resources",
|
|
5
5
|
"comment:bin": "IMPORTANT: This package shares the 'elevasis' binary name with @repo/cli. They never conflict because @elevasis/sdk must NEVER be added as a dependency of any workspace package (apps/*, packages/*, organizations/*). Workspace projects use @repo/cli for the 'elevasis' binary. External developers (outside the workspace) get this SDK's binary via npm install.",
|
|
6
6
|
"type": "module",
|