@compiiile/compiiile 2.9.2 → 2.10.1

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.
Files changed (36) hide show
  1. package/.compiiile/src/layouts/ThemeLoader.astro +4 -0
  2. package/README.md +3 -1
  3. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/@astrojs_vue_client__js.js +62 -0
  4. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/@astrojs_vue_client__js.js.map +7 -0
  5. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/astro___aria-query.js +7084 -0
  6. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/astro___aria-query.js.map +7 -0
  7. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/astro___axobject-query.js +3862 -0
  8. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/astro___axobject-query.js.map +7 -0
  9. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/chunk-5RSW42KR.js +45 -0
  10. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/chunk-5RSW42KR.js.map +7 -0
  11. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/chunk-MBCBSM2B.js +11402 -0
  12. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/chunk-MBCBSM2B.js.map +7 -0
  13. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/chunk-Y2F7D3TJ.js +9 -0
  14. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/chunk-Y2F7D3TJ.js.map +7 -0
  15. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/package.json +3 -0
  16. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/vue.js +324 -0
  17. package/bin/.compiiile/node_modules/.vite/deps_temp_6e4c3b91/vue.js.map +7 -0
  18. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/@astrojs_vue_client__js.js +62 -0
  19. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/@astrojs_vue_client__js.js.map +7 -0
  20. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/astro___aria-query.js +7084 -0
  21. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/astro___aria-query.js.map +7 -0
  22. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/astro___axobject-query.js +3862 -0
  23. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/astro___axobject-query.js.map +7 -0
  24. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/chunk-5RSW42KR.js +45 -0
  25. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/chunk-5RSW42KR.js.map +7 -0
  26. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/chunk-MBCBSM2B.js +11402 -0
  27. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/chunk-MBCBSM2B.js.map +7 -0
  28. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/chunk-Y2F7D3TJ.js +9 -0
  29. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/chunk-Y2F7D3TJ.js.map +7 -0
  30. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/package.json +3 -0
  31. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/vue.js +324 -0
  32. package/bin/.compiiile/node_modules/.vite/deps_temp_c6d3f53d/vue.js.map +7 -0
  33. package/bin/.compiiile/src/env.d.ts +1 -0
  34. package/bin/config.js +7 -6
  35. package/bin/vitePluginCompiiile/models/Context.js +14 -3
  36. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __commonJS = (cb, mod) => function __require() {
3
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
4
+ };
5
+
6
+ export {
7
+ __commonJS
8
+ };
9
+ //# sourceMappingURL=chunk-Y2F7D3TJ.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,324 @@
1
+ import {
2
+ BaseTransition,
3
+ BaseTransitionPropsValidators,
4
+ Comment,
5
+ DeprecationTypes,
6
+ EffectScope,
7
+ ErrorCodes,
8
+ ErrorTypeStrings,
9
+ Fragment,
10
+ KeepAlive,
11
+ ReactiveEffect,
12
+ Static,
13
+ Suspense,
14
+ Teleport,
15
+ Text,
16
+ TrackOpTypes,
17
+ Transition,
18
+ TransitionGroup,
19
+ TriggerOpTypes,
20
+ VueElement,
21
+ assertNumber,
22
+ callWithAsyncErrorHandling,
23
+ callWithErrorHandling,
24
+ camelize,
25
+ capitalize,
26
+ cloneVNode,
27
+ compatUtils,
28
+ compile,
29
+ computed,
30
+ createApp,
31
+ createBaseVNode,
32
+ createBlock,
33
+ createCommentVNode,
34
+ createElementBlock,
35
+ createHydrationRenderer,
36
+ createPropsRestProxy,
37
+ createRenderer,
38
+ createSSRApp,
39
+ createSlots,
40
+ createStaticVNode,
41
+ createTextVNode,
42
+ createVNode,
43
+ customRef,
44
+ defineAsyncComponent,
45
+ defineComponent,
46
+ defineCustomElement,
47
+ defineEmits,
48
+ defineExpose,
49
+ defineModel,
50
+ defineOptions,
51
+ defineProps,
52
+ defineSSRCustomElement,
53
+ defineSlots,
54
+ devtools,
55
+ effect,
56
+ effectScope,
57
+ getCurrentInstance,
58
+ getCurrentScope,
59
+ getTransitionRawChildren,
60
+ guardReactiveProps,
61
+ h,
62
+ handleError,
63
+ hasInjectionContext,
64
+ hydrate,
65
+ initCustomFormatter,
66
+ initDirectivesForSSR,
67
+ inject,
68
+ isMemoSame,
69
+ isProxy,
70
+ isReactive,
71
+ isReadonly,
72
+ isRef,
73
+ isRuntimeOnly,
74
+ isShallow,
75
+ isVNode,
76
+ markRaw,
77
+ mergeDefaults,
78
+ mergeModels,
79
+ mergeProps,
80
+ nextTick,
81
+ normalizeClass,
82
+ normalizeProps,
83
+ normalizeStyle,
84
+ onActivated,
85
+ onBeforeMount,
86
+ onBeforeUnmount,
87
+ onBeforeUpdate,
88
+ onDeactivated,
89
+ onErrorCaptured,
90
+ onMounted,
91
+ onRenderTracked,
92
+ onRenderTriggered,
93
+ onScopeDispose,
94
+ onServerPrefetch,
95
+ onUnmounted,
96
+ onUpdated,
97
+ openBlock,
98
+ popScopeId,
99
+ provide,
100
+ proxyRefs,
101
+ pushScopeId,
102
+ queuePostFlushCb,
103
+ reactive,
104
+ readonly,
105
+ ref,
106
+ registerRuntimeCompiler,
107
+ render,
108
+ renderList,
109
+ renderSlot,
110
+ resolveComponent,
111
+ resolveDirective,
112
+ resolveDynamicComponent,
113
+ resolveFilter,
114
+ resolveTransitionHooks,
115
+ setBlockTracking,
116
+ setDevtoolsHook,
117
+ setTransitionHooks,
118
+ shallowReactive,
119
+ shallowReadonly,
120
+ shallowRef,
121
+ ssrContextKey,
122
+ ssrUtils,
123
+ stop,
124
+ toDisplayString,
125
+ toHandlerKey,
126
+ toHandlers,
127
+ toRaw,
128
+ toRef,
129
+ toRefs,
130
+ toValue,
131
+ transformVNodeArgs,
132
+ triggerRef,
133
+ unref,
134
+ useAttrs,
135
+ useCssModule,
136
+ useCssVars,
137
+ useModel,
138
+ useSSRContext,
139
+ useSlots,
140
+ useTransitionState,
141
+ vModelCheckbox,
142
+ vModelDynamic,
143
+ vModelRadio,
144
+ vModelSelect,
145
+ vModelText,
146
+ vShow,
147
+ version,
148
+ warn,
149
+ watch,
150
+ watchEffect,
151
+ watchPostEffect,
152
+ watchSyncEffect,
153
+ withAsyncContext,
154
+ withCtx,
155
+ withDefaults,
156
+ withDirectives,
157
+ withKeys,
158
+ withMemo,
159
+ withModifiers,
160
+ withScopeId
161
+ } from "./chunk-MBCBSM2B.js";
162
+ import "./chunk-Y2F7D3TJ.js";
163
+ export {
164
+ BaseTransition,
165
+ BaseTransitionPropsValidators,
166
+ Comment,
167
+ DeprecationTypes,
168
+ EffectScope,
169
+ ErrorCodes,
170
+ ErrorTypeStrings,
171
+ Fragment,
172
+ KeepAlive,
173
+ ReactiveEffect,
174
+ Static,
175
+ Suspense,
176
+ Teleport,
177
+ Text,
178
+ TrackOpTypes,
179
+ Transition,
180
+ TransitionGroup,
181
+ TriggerOpTypes,
182
+ VueElement,
183
+ assertNumber,
184
+ callWithAsyncErrorHandling,
185
+ callWithErrorHandling,
186
+ camelize,
187
+ capitalize,
188
+ cloneVNode,
189
+ compatUtils,
190
+ compile,
191
+ computed,
192
+ createApp,
193
+ createBlock,
194
+ createCommentVNode,
195
+ createElementBlock,
196
+ createBaseVNode as createElementVNode,
197
+ createHydrationRenderer,
198
+ createPropsRestProxy,
199
+ createRenderer,
200
+ createSSRApp,
201
+ createSlots,
202
+ createStaticVNode,
203
+ createTextVNode,
204
+ createVNode,
205
+ customRef,
206
+ defineAsyncComponent,
207
+ defineComponent,
208
+ defineCustomElement,
209
+ defineEmits,
210
+ defineExpose,
211
+ defineModel,
212
+ defineOptions,
213
+ defineProps,
214
+ defineSSRCustomElement,
215
+ defineSlots,
216
+ devtools,
217
+ effect,
218
+ effectScope,
219
+ getCurrentInstance,
220
+ getCurrentScope,
221
+ getTransitionRawChildren,
222
+ guardReactiveProps,
223
+ h,
224
+ handleError,
225
+ hasInjectionContext,
226
+ hydrate,
227
+ initCustomFormatter,
228
+ initDirectivesForSSR,
229
+ inject,
230
+ isMemoSame,
231
+ isProxy,
232
+ isReactive,
233
+ isReadonly,
234
+ isRef,
235
+ isRuntimeOnly,
236
+ isShallow,
237
+ isVNode,
238
+ markRaw,
239
+ mergeDefaults,
240
+ mergeModels,
241
+ mergeProps,
242
+ nextTick,
243
+ normalizeClass,
244
+ normalizeProps,
245
+ normalizeStyle,
246
+ onActivated,
247
+ onBeforeMount,
248
+ onBeforeUnmount,
249
+ onBeforeUpdate,
250
+ onDeactivated,
251
+ onErrorCaptured,
252
+ onMounted,
253
+ onRenderTracked,
254
+ onRenderTriggered,
255
+ onScopeDispose,
256
+ onServerPrefetch,
257
+ onUnmounted,
258
+ onUpdated,
259
+ openBlock,
260
+ popScopeId,
261
+ provide,
262
+ proxyRefs,
263
+ pushScopeId,
264
+ queuePostFlushCb,
265
+ reactive,
266
+ readonly,
267
+ ref,
268
+ registerRuntimeCompiler,
269
+ render,
270
+ renderList,
271
+ renderSlot,
272
+ resolveComponent,
273
+ resolveDirective,
274
+ resolveDynamicComponent,
275
+ resolveFilter,
276
+ resolveTransitionHooks,
277
+ setBlockTracking,
278
+ setDevtoolsHook,
279
+ setTransitionHooks,
280
+ shallowReactive,
281
+ shallowReadonly,
282
+ shallowRef,
283
+ ssrContextKey,
284
+ ssrUtils,
285
+ stop,
286
+ toDisplayString,
287
+ toHandlerKey,
288
+ toHandlers,
289
+ toRaw,
290
+ toRef,
291
+ toRefs,
292
+ toValue,
293
+ transformVNodeArgs,
294
+ triggerRef,
295
+ unref,
296
+ useAttrs,
297
+ useCssModule,
298
+ useCssVars,
299
+ useModel,
300
+ useSSRContext,
301
+ useSlots,
302
+ useTransitionState,
303
+ vModelCheckbox,
304
+ vModelDynamic,
305
+ vModelRadio,
306
+ vModelSelect,
307
+ vModelText,
308
+ vShow,
309
+ version,
310
+ warn,
311
+ watch,
312
+ watchEffect,
313
+ watchPostEffect,
314
+ watchSyncEffect,
315
+ withAsyncContext,
316
+ withCtx,
317
+ withDefaults,
318
+ withDirectives,
319
+ withKeys,
320
+ withMemo,
321
+ withModifiers,
322
+ withScopeId
323
+ };
324
+ //# sourceMappingURL=vue.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="astro/client" />
package/bin/config.js CHANGED
@@ -5,6 +5,7 @@ import compiiile from "./vitePluginCompiiile/index.js"
5
5
  import mdx from "@astrojs/mdx"
6
6
  import path from "node:path"
7
7
  import { copyFileSync, cpSync } from "node:fs"
8
+ import { fileURLToPath } from "node:url"
8
9
  import markdownConfig from "./vitePluginCompiiile/markdownConfig.js"
9
10
  import resolvePackagePath from "resolve-package-path"
10
11
  import requireg from "requireg"
@@ -19,7 +20,7 @@ import yargs from "yargs/yargs"
19
20
  import { hideBin } from "yargs/helpers"
20
21
 
21
22
  import { readFile } from "fs/promises"
22
- const packageJSON = JSON.parse(await readFile(new URL("../package.json", import.meta.url)))
23
+ const packageJSON = JSON.parse(await readFile(fileURLToPath(new URL("../package.json", import.meta.url))))
23
24
 
24
25
  /*
25
26
  Order of options by priority:
@@ -113,7 +114,7 @@ const publicDir = path.resolve(source, "./.compiiile/public")
113
114
 
114
115
  if (argv.logo) {
115
116
  try {
116
- cpSync(new URL("../.compiiile/public", import.meta.url).pathname, publicDir, { recursive: true })
117
+ cpSync(fileURLToPath(new URL("../.compiiile/public", import.meta.url)), publicDir, { recursive: true })
117
118
  copyFileSync(path.resolve(source, argv.logo), path.resolve(publicDir, "favicon.png"))
118
119
  // Set the logo to be displayed on the top bar if we were able to copy
119
120
  process.env.VITE_COMPIIILE_LOGO = argv.logo
@@ -128,7 +129,7 @@ import { createRequire } from "node:module"
128
129
  const require = createRequire(import.meta.url)
129
130
  const pathName = require.resolve("@fontsource-variable/archivo")
130
131
  import { packageDirectory } from "pkg-dir"
131
- const viteServerFsAllowList = [source, new URL("../", import.meta.url).pathname, path.resolve(pathName, "../../")]
132
+ const viteServerFsAllowList = [source, fileURLToPath(new URL("../", import.meta.url)), path.resolve(pathName, "../../")]
132
133
  const packageDir = await packageDirectory()
133
134
  if (packageDir) {
134
135
  viteServerFsAllowList.push(packageDir)
@@ -145,8 +146,8 @@ const astroConfig = {
145
146
  host: argv.host,
146
147
  port: argv.port
147
148
  },
148
- root: new URL("../.compiiile", import.meta.url).pathname,
149
- srcDir: new URL("../.compiiile/src", import.meta.url).pathname,
149
+ root: fileURLToPath(new URL("../.compiiile", import.meta.url)),
150
+ srcDir: fileURLToPath(new URL("../.compiiile/src", import.meta.url)),
150
151
  outDir: path.join(source, argv.dest || ".compiiile/dist"),
151
152
  ...(argv.logo ? { publicDir } : {}),
152
153
  integrations: [
@@ -159,9 +160,9 @@ const astroConfig = {
159
160
  vite: {
160
161
  plugins: [compiiile()],
161
162
  resolve: {
163
+ preserveSymlinks: true,
162
164
  alias: {
163
165
  "@source": source,
164
-
165
166
  // Adding aliases for Compiiile's build command to work when installed globally
166
167
  vue: resolve("vue"),
167
168
  "@vue/server-renderer": resolve("@vue/server-renderer"),
@@ -39,7 +39,7 @@ export default class {
39
39
  .map((val) => slugify(val, { lower: true }))
40
40
  .join("/")
41
41
 
42
- if (sluggifiedPath.match(entryFileMatcher)) {
42
+ if (sluggifiedPath.match(new RegExp(/^/.source + entryFileMatcher.source))) {
43
43
  if (process.env.VITE_COMPIIILE_BASE !== "/") {
44
44
  return process.env.VITE_COMPIIILE_BASE
45
45
  }
@@ -85,7 +85,9 @@ export default class {
85
85
  const fileName = path.parse(filePath).name
86
86
  const isReadmeFile =
87
87
  !isDirectory &&
88
- filePath.toLowerCase().match(new RegExp(/^/.source + entryFileMatcher.source + /\.mdx?$/.source))
88
+ filePath
89
+ .toLowerCase()
90
+ .match(new RegExp(/^(.*?\/?)/.source + entryFileMatcher.source + /\.mdx?$/.source))
89
91
 
90
92
  let filesTreeItem = new FilesTreeItem(uuid, fileName)
91
93
 
@@ -147,7 +149,16 @@ export default class {
147
149
  )
148
150
 
149
151
  if (isReadmeFile) {
150
- this.fileList.unshift(fileListItem)
152
+ let newIndex = 0
153
+
154
+ if (directoryPath !== ".") {
155
+ newIndex = this.fileList.findIndex((f) => f.fullPath.startsWith(directoryPath))
156
+ if (newIndex < 0) {
157
+ newIndex = this.fileList.length
158
+ }
159
+ }
160
+
161
+ this.fileList.splice(newIndex, 0, fileListItem)
151
162
  } else {
152
163
  this.fileList.push(fileListItem)
153
164
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@compiiile/compiiile",
3
3
  "private": false,
4
- "version": "2.9.2",
4
+ "version": "2.10.1",
5
5
  "description": "The most convenient way to render a folder containing markdown files. Previewing and searching markdown files has never been that easy.",
6
6
  "author": "AlbanCrepel <alban.crepel@gmail.com>",
7
7
  "license": "GPL-3.0-only",