uranio 0.1.10 → 0.1.11

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.
@@ -1,8 +1,6 @@
1
1
  {
2
- "name": "client",
3
- "version": "1.0.0",
2
+ "name": "uranio-client",
4
3
  "main": "dist/index.js",
5
- "license": "MIT",
6
4
  "scripts": {
7
5
  "build": "yarn tsc -b",
8
6
  "dev": "yarn tsc -w"
@@ -25,6 +23,6 @@
25
23
  "typescript": "^5.2.2"
26
24
  },
27
25
  "dependencies": {
28
- "uranio": "0.1.10"
26
+ "uranio": "0.1.11"
29
27
  }
30
28
  }
@@ -6,9 +6,6 @@
6
6
  *
7
7
  */
8
8
 
9
- import * as types from './types';
10
- export {types};
11
-
12
- import {UranioClient} from './uranio-client';
13
- export default UranioClient;
9
+ import {UranioClient as Client} from './uranio-client';
10
+ export {Client};
14
11
 
@@ -7,19 +7,19 @@
7
7
  */
8
8
 
9
9
  import {Client, ClientParams} from './client';
10
- // import {Atom} from './types';
11
- // import {AtomClient} from './atom';
10
+ import {Atom} from './types';
11
+ import {AtomClient} from './atom';
12
12
 
13
- // interface Product extends Atom {
14
- // title: string;
15
- // price: number;
16
- // }
13
+ interface Product extends Atom {
14
+ title: string;
15
+ price: number;
16
+ }
17
17
 
18
18
  export class UranioClient extends Client{
19
- // public product: AtomClient<Product>;
19
+ public product: AtomClient<Product>;
20
20
  constructor(params: ClientParams) {
21
21
  super(params);
22
- // this.product = new AtomClient<Product>(this.db, 'product');
22
+ this.product = new AtomClient<Product>(this.db, 'product');
23
23
  }
24
24
  }
25
25
 
package/dist/index.d.ts CHANGED
@@ -4,6 +4,5 @@
4
4
  *
5
5
  * @packageDocumentation
6
6
  */
7
- export interface atom {
8
- _id: string;
9
- }
7
+ import * as uranio from './main';
8
+ export default uranio;
package/dist/index.js CHANGED
@@ -5,5 +5,30 @@
5
5
  *
6
6
  * @packageDocumentation
7
7
  */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
8
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
+ const uranio = __importStar(require("./main"));
33
+ exports.default = uranio;
9
34
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAiC;AACjC,kBAAe,MAAM,CAAC"}
package/dist/main.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ /**
2
+ *
3
+ * Index module
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import { Client } from '.uranio';
8
+ export { Client };
9
+ export interface atom {
10
+ }
11
+ export type primary<T> = T;
12
+ export type unique<T> = T;
package/dist/main.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Index module
5
+ *
6
+ * @packageDocumentation
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.Client = void 0;
10
+ const _uranio_1 = require(".uranio");
11
+ Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return _uranio_1.Client; } });
12
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,qCAA+B;AACvB,uFADA,gBAAM,OACA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uranio",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Uranio is a type-safe ODM for MongoDB",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -14,14 +14,17 @@
14
14
  "uranio": "dist/bin.js"
15
15
  },
16
16
  "scripts": {
17
+ ".uranio:build": "yarn tsc --project ./.uranio",
18
+ ".uranio:copy": "bash ./scripts/copy_dot_uranio.sh",
19
+ ".uranio:dev:.uranio": "yarn .uranio:build && yarn .uranio:copy",
17
20
  "build": "yarn tsc -b",
18
21
  "dev": "yarn tsc -w",
19
22
  "dev:base": "node ./dist/index.js",
20
23
  "dev:bin": "node ./dist/bin.js",
21
24
  "dev:run": "yarn tsc-watch --onSuccess \"yarn dev:bin\"",
22
- "push:patch": "sh ./scripts/version.sh patch",
23
- "push:minor": "sh ./scripts/version.sh minor",
24
- "push:major": "sh ./scripts/version.sh major"
25
+ "push:patch": "bash ./scripts/version.sh patch",
26
+ "push:minor": "bash ./scripts/version.sh minor",
27
+ "push:major": "bash ./scripts/version.sh major"
25
28
  },
26
29
  "devDependencies": {
27
30
  "@types/node": "^20.9.0",
@@ -0,0 +1,6 @@
1
+ #!/bin/bash
2
+
3
+ rm -rf ./node_modules/.uranio
4
+ cp -rf ./.uranio node_modules/.uranio
5
+ rm -rf ./node_modules/.uranio/node_modules
6
+ # rm -rf ./node_modules/.uranio/dist
package/src/index.ts CHANGED
@@ -5,6 +5,5 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
 
8
- export interface atom {
9
- _id: string
10
- }
8
+ import * as uranio from './main';
9
+ export default uranio;
package/src/main.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ *
3
+ * Index module
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+
8
+ import {Client} from '.uranio';
9
+ export {Client}
10
+
11
+ export interface atom {}
12
+
13
+ export type primary<T> = T;
14
+
15
+ export type unique<T> = T;
@@ -1,35 +0,0 @@
1
- {
2
- "name": "uranio-client",
3
- "version": "0.1.2",
4
- "description": "Uranio client is an auto-generated, type-safe ODM client for MongoDB",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "repository": "git+ssh://git@github.com/x71c9/uranio.git",
8
- "author": "x71c9 <108585118+x71c9@users.noreply.github.com>",
9
- "license": "UNLICENSED",
10
- "peerDependencies": {
11
- "uranio": "*"
12
- },
13
- "peerDependenciesMeta": {
14
- "uranio": {
15
- "optional": true
16
- }
17
- },
18
- "sideEffects": false,
19
- "scripts": {
20
- "build": "yarn tsc -b",
21
- "dev": "yarn tsc -w",
22
- "link:.uranio": "ln -s ~/repos/uranio/.uranio ~/repos/uranio/uranio/packages/client/node_modules/.uranio",
23
- "push:patch": "sh ./scripts/version.sh patch",
24
- "push:minor": "sh ./scripts/version.sh minor",
25
- "push:major": "sh ./scripts/version.sh major"
26
- },
27
- "devDependencies": {
28
- "@types/node": "^20.9.0",
29
- "typescript": "^5.2.2"
30
- },
31
- "dependencies": {
32
- "i0n": "^0.7.3",
33
- "mongodb": "^6.2.0"
34
- }
35
- }
@@ -1,3 +0,0 @@
1
- import uranio_client, {types} from '.uranio/client';
2
- export default uranio_client;
3
- export {types};
@@ -1,33 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "alwaysStrict": true,
4
- "allowJs": true,
5
- "baseUrl": ".",
6
- "declaration": true,
7
- "esModuleInterop": true,
8
- "experimentalDecorators": true,
9
- "incremental": false,
10
- "lib": ["ESNext", "ESNext.AsyncIterable", "DOM", "ES2021"],
11
- "module": "CommonJS",
12
- "moduleResolution": "node",
13
- "noEmit": false,
14
- "noFallthroughCasesInSwitch": true,
15
- "noImplicitThis": true,
16
- "noImplicitAny": true,
17
- "noUncheckedIndexedAccess": true,
18
- "noUnusedLocals": true,
19
- "noUnusedParameters": true,
20
- "outDir": "./dist",
21
- "rootDir": "./src",
22
- "skipLibCheck": true,
23
- "sourceMap": true,
24
- "strict": true,
25
- "strictNullChecks": true,
26
- "strictFunctionTypes": true,
27
- "strictPropertyInitialization": true,
28
- "target": "ES2018",
29
- "typeRoots": ["node_modules/@types"]
30
- },
31
- "include": ["src/**/*.ts"],
32
- "exclude": ["node_modules"]
33
- }