@electroplix/adapter 0.1.0 → 0.1.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/index.esm.js CHANGED
@@ -101,10 +101,6 @@ function checkVersionStability(version) {
101
101
  return 'unknown';
102
102
  }
103
103
 
104
- /* ------------------------------------------------------------------ */
105
- /* Simple coloured logger – zero dependencies */
106
- /* ------------------------------------------------------------------ */
107
-
108
104
  const RESET = '\x1b[0m';
109
105
  const BOLD = '\x1b[1m';
110
106
  const GREEN = '\x1b[32m';
@@ -113,47 +109,53 @@ const RED = '\x1b[31m';
113
109
  const CYAN = '\x1b[36m';
114
110
  const DIM = '\x1b[2m';
115
111
  const ORANGE = '\x1b[38;5;208m';
116
- const logger = {
117
- info(msg) {
118
- console.log(`${CYAN}ℹ${RESET} ${msg}`);
119
- },
120
- success(msg) {
121
- console.log(`${GREEN}✔${RESET} ${msg}`);
122
- },
123
- warn(msg) {
124
- console.log(`${YELLOW}⚠${RESET} ${msg}`);
125
- },
126
- error(msg) {
127
- console.error(`${RED}✖${RESET} ${msg}`);
128
- },
129
- step(msg) {
130
- console.log(`\n${BOLD}${CYAN}${msg}${RESET}`);
131
- },
132
- dim(msg) {
133
- console.log(`${DIM} ${msg}${RESET}`);
134
- },
112
+ class Logger {
113
+ info(message) {
114
+ console.log(`${CYAN}ℹ ${RESET}${message}`);
115
+ }
116
+ success(message) {
117
+ console.log(`${GREEN}✓ ${RESET}${message}`);
118
+ }
119
+ warn(message) {
120
+ console.log(`${YELLOW}⚠ ${RESET}${message}`);
121
+ }
122
+ error(message) {
123
+ console.log(`${RED}✖ ${RESET}${message}`);
124
+ }
125
+ step(message) {
126
+ console.log(`${CYAN}● ${RESET}${BOLD}${message}${RESET}`);
127
+ }
128
+ dim(message) {
129
+ console.log(` ${DIM}${message}${RESET}`);
130
+ }
131
+ debug(message) {
132
+ console.log(`${DIM}⋯ ${message}${RESET}`);
133
+ }
134
+ newline() {
135
+ console.log('');
136
+ }
135
137
  banner() {
136
138
  console.log('');
137
- console.log(`${BOLD}${CYAN} ╔═══════════════════════════════════════════════════════════╗${RESET}`);
138
- console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
139
- console.log(`${BOLD}${CYAN} ║${RESET} ${YELLOW}⚡${RESET} ${CYAN}╲│╱${RESET} ${YELLOW}⚡${RESET} ${BOLD}${CYAN}║${RESET}`);
140
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}┌──┤├──┐${RESET} ${BOLD}${CYAN}║${RESET}`);
141
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}│${RESET} ${YELLOW}■${RESET} ${YELLOW}■${RESET} ${CYAN}│${RESET} ${CYAN}┌───────────┐${RESET} ${BOLD}${CYAN}║${RESET}`);
142
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}│ └──┘ │${RESET} ${CYAN}┌┤${RESET}${ORANGE} ░●░ ░●░ ${RESET}${CYAN}├┐${RESET} ${BOLD}${CYAN}║${RESET}`);
143
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}└─┤ ├─┘─────────┤│${RESET}${ORANGE} ░●░ ░●░ ${RESET}${CYAN}│├${RESET} ${BOLD}${CYAN}║${RESET}`);
144
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}┌──┤${RESET}${YELLOW}⚡${RESET}${CYAN}├──┐${RESET} ${CYAN}├┤${RESET}${ORANGE} ░●░ ░●░ ${RESET}${CYAN}├┤${RESET} ${BOLD}${CYAN}║${RESET}`);
145
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}╘╗ │ │ ╔╛${RESET} ${CYAN}└┤${RESET}${ORANGE} ░●░ ░●░ ${RESET}${CYAN}├┘${RESET} ${BOLD}${CYAN}║${RESET}`);
146
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}└─┬┬─┘${RESET} ${CYAN}└───────────┘${RESET} ${BOLD}${CYAN}║${RESET}`);
147
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}┌──┘└──┐${RESET} ${BOLD}${CYAN}║${RESET}`);
148
- console.log(`${BOLD}${CYAN} ║${RESET} ${CYAN}└──────┘${RESET} ${BOLD}${CYAN}║${RESET}`);
149
- console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
150
- console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${YELLOW}⚡ Electroplix Deploy Adapter${RESET} ${BOLD}${CYAN}║${RESET}`);
151
- console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}Cloudflare Workers deploy for Next.js${RESET} ${BOLD}${CYAN}║${RESET}`);
152
- console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
153
- console.log(`${BOLD}${CYAN} ╚═══════════════════════════════════════════════════════════╝${RESET}`);
139
+ console.log(`${BOLD}${CYAN} ╔════════════════════════════════════════════════════════╗${RESET}`);
140
+ console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}___${RESET} ${BOLD}${CYAN}║${RESET}`);
141
+ console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}[${RESET}${YELLOW}o${RESET}${DIM}]${RESET} ${BOLD}${CYAN}║${RESET}`);
142
+ console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}.-"""${YELLOW}⚡${ORANGE}"""""--.${RESET} ${BOLD}${CYAN}║${RESET}`);
143
+ console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}.' ${YELLOW}⚡${RESET} ${ORANGE}\\ '.${RESET} ${BOLD}${CYAN}║${RESET}`);
144
+ console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}/ ${YELLOW}⚡${RESET} ${ORANGE}\\ ; \\${RESET} ${BOLD}${CYAN}║${RESET}`);
145
+ console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}|${RESET}${YELLOW} ⚡${RESET} ${ORANGE}=====${RESET} ${ORANGE}'; |${RESET} ${BOLD}${CYAN}║${RESET}`);
146
+ console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}\\ ${YELLOW}⚡${RESET} ${ORANGE}/ .' /${RESET} ${BOLD}${CYAN}║${RESET}`);
147
+ console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}'-..__..--' ${DIM}_.~"~.${RESET} ${BOLD}${CYAN}║${RESET}`);
148
+ console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}_.~" ~._.~" ${RESET}${DIM} ~._.~"~.${RESET} ${BOLD}${CYAN}║${RESET}`);
149
+ console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}~" ~._.~" ~._.~" ~.${RESET} ${BOLD}${CYAN}║${RESET}`);
150
+ console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
151
+ console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${YELLOW}⚡ Electroplix Deploy Adapter${RESET} ${BOLD}${CYAN}║${RESET}`);
152
+ console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}Cloudflare Workers deploy for Next.js${RESET} ${BOLD}${CYAN}║${RESET}`);
153
+ console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
154
+ console.log(`${BOLD}${CYAN} ╚════════════════════════════════════════════════════════╝${RESET}`);
154
155
  console.log('');
155
156
  }
156
- };
157
+ }
158
+ const logger = new Logger();
157
159
 
158
160
  /* ------------------------------------------------------------------ */
159
161
  /* Install/uninstall packages via detected package manager */
@@ -1,10 +1,13 @@
1
- export declare const logger: {
2
- info(msg: string): void;
3
- success(msg: string): void;
4
- warn(msg: string): void;
5
- error(msg: string): void;
6
- step(msg: string): void;
7
- dim(msg: string): void;
1
+ export declare class Logger {
2
+ info(message: string): void;
3
+ success(message: string): void;
4
+ warn(message: string): void;
5
+ error(message: string): void;
6
+ step(message: string): void;
7
+ dim(message: string): void;
8
+ debug(message: string): void;
9
+ newline(): void;
8
10
  banner(): void;
9
- };
11
+ }
12
+ export declare const logger: Logger;
10
13
  //# sourceMappingURL=logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/logger.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM;cACP,MAAM;iBAGH,MAAM;cAGT,MAAM;eAGL,MAAM;cAGP,MAAM;aAGP,MAAM;;CAwBhB,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/logger.ts"],"names":[],"mappings":"AASA,qBAAa,MAAM;IACjB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,OAAO,CAAC,OAAO,EAAE,MAAM;IAIvB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,GAAG,CAAC,OAAO,EAAE,MAAM;IAInB,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB,OAAO;IAIP,MAAM;CAoBP;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electroplix/adapter",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CLI for setting up Cloudflare Workers deploy pipelines in Next.js projects via OpenNext.",
5
5
  "type": "module",
6
6
  "sideEffects": false,