buildfunctions 0.0.1 → 0.0.3

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 CHANGED
@@ -1 +1 @@
1
- # cli
1
+ # The Buildfunctions SDK (JavaScript and TypeScript)
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Buildfunctions CLI
4
+ */
5
+ import test from './test.js';
6
+ // Available commands
7
+ const commands = {
8
+ test,
9
+ };
10
+ // Get command from arguments
11
+ const command = process.argv[2];
12
+ if (command && commands[command]) {
13
+ console.log(commands[command]());
14
+ }
15
+ else {
16
+ console.log('Available commands: test');
17
+ }
18
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;GAEG;AACH,OAAO,IAAI,MAAM,WAAW,CAAC;AAI7B,qBAAqB;AACrB,MAAM,QAAQ,GAAiC;IAC7C,IAAI;CACL,CAAC;AAEF,6BAA6B;AAC7B,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEhC,IAAI,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE;IAChC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAE,EAAE,CAAC,CAAC;CACnC;KAAM;IACL,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;CACzC"}
package/dist/test.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The Buildfunctions SDK - test function
3
+ */
4
+ declare type Message = string;
5
+ /**
6
+ * Test function that returns a message
7
+ */
8
+ export default function test(): Message;
9
+ export {};
10
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,aAAK,OAAO,GAAG,MAAM,CAAC;AAEtB;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI,IAAI,OAAO,CAEtC"}
package/dist/test.js ADDED
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Test function that returns a message
3
+ */
4
+ export default function test() {
5
+ return "Hello, world from the Buildfunctions JavaScript and TypeScript SDK";
6
+ }
7
+ //# sourceMappingURL=test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,IAAI;IAC1B,OAAO,oEAAoE,CAAC;AAC9E,CAAC"}
package/package.json CHANGED
@@ -1,22 +1,43 @@
1
1
  {
2
2
  "name": "buildfunctions",
3
- "version": "0.0.1",
4
- "description": "CLI coming soon",
5
- "main": "index.js",
3
+ "version": "0.0.3",
4
+ "description": "The Buildfunctions SDK (JavaScript and TypeScript)",
5
+ "type": "module",
6
+ "main": "./dist/test.js",
7
+ "types": "./dist/test.d.ts",
6
8
  "bin": {
7
- "deploy": "./index.js"
9
+ "buildfunctions": "./dist/cli.js"
8
10
  },
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/test.d.ts",
14
+ "import": "./dist/test.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
9
20
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1",
11
- "start": "node index.js"
21
+ "build": "tsc",
22
+ "dev": "tsc --watch",
23
+ "start": "node dist/cli.js",
24
+ "prepublishOnly": "npm run build",
25
+ "test": "echo \"Error: no test specified\" && exit 1"
12
26
  },
13
27
  "repository": {
14
28
  "type": "git",
15
- "url": "git+https://github.com/buildfunctions/cli.git"
29
+ "url": "git+https://github.com/buildfunctions/sdk.git"
16
30
  },
31
+ "keywords": [
32
+ "buildfunctions",
33
+ "sdk"
34
+ ],
17
35
  "author": "Buildfunctions",
18
36
  "bugs": {
19
- "url": "https://github.com/buildfunctions/cli/issues"
37
+ "url": "https://github.com/buildfunctions/sdk/issues"
20
38
  },
21
- "homepage": "https://github.com/buildfunctions/cli#readme"
39
+ "homepage": "https://github.com/buildfunctions/sdk#readme",
40
+ "devDependencies": {
41
+ "typescript": "5.9.2"
42
+ }
22
43
  }
package/index.js DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- function sayHello() {
4
- console.log("Hello, world! A deploy command executed from the CLI");
5
- }
6
-
7
- if (require.main === module) {
8
- // If the script is run directly from the command line, execute the function.
9
- sayHello();
10
- } else {
11
- // If the script is required by another module, export the function.
12
- module.exports = sayHello;
13
- }