@pylo/node 0.0.2 → 0.0.4

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.js CHANGED
@@ -1,4 +1,27 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/cli.ts
4
- import "@pylo/core/cli";
4
+ import { generate } from "@pylo/core/codegen";
5
+ var args = process.argv.slice(2);
6
+ var command = args[0];
7
+ if (command === "generate") {
8
+ generate({ importSource: "@pylo/node" }).catch((err) => {
9
+ console.error(
10
+ "Error:",
11
+ err instanceof Error ? err.message : String(err)
12
+ );
13
+ process.exit(1);
14
+ });
15
+ } else {
16
+ console.log("Usage: pylo generate");
17
+ console.log("");
18
+ console.log("Commands:");
19
+ console.log(
20
+ " generate Introspect Pylo schema and generate TypeScript types"
21
+ );
22
+ if (command && command !== "--help" && command !== "-h") {
23
+ console.error(`
24
+ Unknown command: ${command}`);
25
+ process.exit(1);
26
+ }
27
+ }
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { SchemaMetadata, PyloClient } from '@pylo/core';
2
- export { AuthProvider, ByIdOptions, ClientOptions, EntityClient, EntityFields, EntityMetadata, EntityName, EntityRelations, EntityResult, EntitySelect, FilterInput, ListOptions, ListResult, PaginationData, PaginationInput, PyloClient, PyloError, QueryInput, QueryInputCondition, QueryOperator, SchemaMetadata, SearchValueInput, SortInput, SortOrder, StrictSelect, UpsertInput } from '@pylo/core';
2
+ export { AuthProvider, ByIdOptions, ClientOptions, EntityClient, EntityFields, EntityMetadata, EntityName, EntityRelations, EntityResult, EntitySelect, FilterInput, ListOptions, ListResult, PaginationData, PaginationInput, PyloClient, PyloError, QueryInput, QueryInputCondition, QueryOperator, RequestOptions, SchemaMetadata, SearchValueInput, SortInput, SortOrder, StrictSelect, UpsertInput } from '@pylo/core';
3
3
 
4
4
  interface NodeClientOptions {
5
5
  apiKey: string;
6
6
  endpoint?: string;
7
7
  schemaMetadata: SchemaMetadata;
8
+ headers?: Record<string, string>;
8
9
  }
9
10
  declare function createPyloNode<S>(options: NodeClientOptions): PyloClient<S>;
10
11
 
package/dist/index.js CHANGED
@@ -5,7 +5,8 @@ function createPyloNode(options) {
5
5
  return createPyloClient({
6
6
  ...options.endpoint !== void 0 ? { endpoint: options.endpoint } : {},
7
7
  schemaMetadata: options.schemaMetadata,
8
- auth: async () => ({ apiKey: options.apiKey })
8
+ auth: async () => ({ apiKey: options.apiKey }),
9
+ ...options.headers !== void 0 ? { headers: options.headers } : {}
9
10
  });
10
11
  }
11
12
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pylo/node",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Server-side Pylo SDK with API key authentication",
5
5
  "exports": {
6
6
  ".": {
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@pylo/core": "0.0.4"
25
+ "@pylo/core": "0.0.6"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.15.21",