deesse 0.1.2 → 0.1.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.
@@ -1,3 +1,3 @@
1
- import { Config } from "./types";
1
+ import type { Config } from "./types";
2
+ export declare const defineConfig: (config: Config) => Config;
2
3
  export declare const getConfig: () => Config;
3
- export declare const defineConfig: () => void;
@@ -1,9 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.defineConfig = exports.getConfig = void 0;
3
+ exports.getConfig = exports.defineConfig = void 0;
4
+ let _config = null;
5
+ const defineConfig = (config) => {
6
+ _config = config;
7
+ return config;
8
+ };
9
+ exports.defineConfig = defineConfig;
4
10
  const getConfig = () => {
5
- return {};
11
+ if (!_config) {
12
+ throw new Error("Config not defined. Call defineConfig() first.");
13
+ }
14
+ return _config;
6
15
  };
7
16
  exports.getConfig = getConfig;
8
- const defineConfig = () => { };
9
- exports.defineConfig = defineConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deesse",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "The fullstack web framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",