Skip to content

Commit

Permalink
Merge pull request #35 from laravelcompany/dev
Browse files Browse the repository at this point in the history
Fix build process using pre-render
  • Loading branch information
izdrail authored Jan 22, 2025
2 parents b0edaad + 9a82c54 commit 9d89d41
Show file tree
Hide file tree
Showing 179 changed files with 4,336 additions and 4,421 deletions.
1 change: 1 addition & 0 deletions .astro/content-assets.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default new Map();
1 change: 1 addition & 0 deletions .astro/content-modules.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default new Map();
155 changes: 155 additions & 0 deletions .astro/content.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
declare module 'astro:content' {
export interface RenderResult {
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
}
interface Render {
'.md': Promise<RenderResult>;
}

export interface RenderedContent {
html: string;
metadata?: {
imagePaths: Array<string>;
[key: string]: unknown;
};
}
}

declare module 'astro:content' {
type Flatten<T> = T extends { [K: string]: infer U } ? U : never;

export type CollectionKey = keyof AnyEntryMap;
export type CollectionEntry<C extends CollectionKey> = Flatten<AnyEntryMap[C]>;

export type ContentCollectionKey = keyof ContentEntryMap;
export type DataCollectionKey = keyof DataEntryMap;

type AllValuesOf<T> = T extends any ? T[keyof T] : never;
type ValidContentEntrySlug<C extends keyof ContentEntryMap> = AllValuesOf<
ContentEntryMap[C]
>['slug'];

/** @deprecated Use `getEntry` instead. */
export function getEntryBySlug<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(
collection: C,
// Note that this has to accept a regular string too, for SSR
entrySlug: E,
): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;

/** @deprecated Use `getEntry` instead. */
export function getDataEntryById<C extends keyof DataEntryMap, E extends keyof DataEntryMap[C]>(
collection: C,
entryId: E,
): Promise<CollectionEntry<C>>;

export function getCollection<C extends keyof AnyEntryMap, E extends CollectionEntry<C>>(
collection: C,
filter?: (entry: CollectionEntry<C>) => entry is E,
): Promise<E[]>;
export function getCollection<C extends keyof AnyEntryMap>(
collection: C,
filter?: (entry: CollectionEntry<C>) => unknown,
): Promise<CollectionEntry<C>[]>;

export function getEntry<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(entry: {
collection: C;
slug: E;
}): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof DataEntryMap,
E extends keyof DataEntryMap[C] | (string & {}),
>(entry: {
collection: C;
id: E;
}): E extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof ContentEntryMap,
E extends ValidContentEntrySlug<C> | (string & {}),
>(
collection: C,
slug: E,
): E extends ValidContentEntrySlug<C>
? Promise<CollectionEntry<C>>
: Promise<CollectionEntry<C> | undefined>;
export function getEntry<
C extends keyof DataEntryMap,
E extends keyof DataEntryMap[C] | (string & {}),
>(
collection: C,
id: E,
): E extends keyof DataEntryMap[C]
? string extends keyof DataEntryMap[C]
? Promise<DataEntryMap[C][E]> | undefined
: Promise<DataEntryMap[C][E]>
: Promise<CollectionEntry<C> | undefined>;

/** Resolve an array of entry references from the same collection */
export function getEntries<C extends keyof ContentEntryMap>(
entries: {
collection: C;
slug: ValidContentEntrySlug<C>;
}[],
): Promise<CollectionEntry<C>[]>;
export function getEntries<C extends keyof DataEntryMap>(
entries: {
collection: C;
id: keyof DataEntryMap[C];
}[],
): Promise<CollectionEntry<C>[]>;

export function render<C extends keyof AnyEntryMap>(
entry: AnyEntryMap[C][string],
): Promise<RenderResult>;

export function reference<C extends keyof AnyEntryMap>(
collection: C,
): import('astro/zod').ZodEffects<
import('astro/zod').ZodString,
C extends keyof ContentEntryMap
? {
collection: C;
slug: ValidContentEntrySlug<C>;
}
: {
collection: C;
id: keyof DataEntryMap[C];
}
>;
// Allow generic `string` to avoid excessive type errors in the config
// if `dev` is not running to update as you edit.
// Invalid collection names will be caught at build time.
export function reference<C extends string>(
collection: C,
): import('astro/zod').ZodEffects<import('astro/zod').ZodString, never>;

type ReturnTypeOrOriginal<T> = T extends (...args: any[]) => infer R ? R : T;
type InferEntrySchema<C extends keyof AnyEntryMap> = import('astro/zod').infer<
ReturnTypeOrOriginal<Required<ContentConfig['collections'][C]>['schema']>
>;

type ContentEntryMap = {

};

type DataEntryMap = {

};

type AnyEntryMap = ContentEntryMap & DataEntryMap;

export type ContentConfig = typeof import("../src/content.config.mjs");
}
1 change: 1 addition & 0 deletions .astro/data-store.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.1.8","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":4321,\"streaming\":true},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[],\"remotePatterns\":[]},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":\"shiki\",\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false},\"legacy\":{\"collections\":false}}"]
5 changes: 5 additions & 0 deletions .astro/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1737500866298
}
}
1 change: 1 addition & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
13 changes: 12 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

# FRONTEND

# Install NVM and NodeJS
ENV NVM_DIR=/usr/local/nvm
ENV NODE_VERSION=v21.0.0

RUN mkdir -p $NVM_DIR && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION"

ENV NODE_PATH=$NVM_DIR/versions/node/$NODE_VERSION/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH

COPY frontend /home/frontend/
COPY frontend/package.json /home/frontend/package.json
WORKDIR /home/frontend/
RUN npm install --legacy-peer-deps

RUN npm install sass-embedded
RUN npm run build
#Now copy to Return-Receipt-To:


Expand Down
1 change: 1 addition & 0 deletions backend/supervisord.pid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
2 changes: 1 addition & 1 deletion docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ loglevel=debug

[program:frontend]
directory=/home/frontend
command=npm run preview
command=npm run dev
autostart=true
autorestart=true
startsecs=5
Expand Down
171 changes: 1 addition & 170 deletions frontend/.astro/astro/content.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ declare module 'astro:content' {
Content: import('astro').MarkdownInstance<{}>['Content'];
headings: import('astro').MarkdownHeading[];
remarkPluginFrontmatter: Record<string, any>;
components: import('astro').MDXInstance<{}>['components'];
}>;
}
}
Expand Down Expand Up @@ -228,176 +229,6 @@ declare module 'astro:content' {
collection: "docs";
data: InferEntrySchema<"docs">
} & { render(): Render[".mdx"] };
};
"real-docs": {
"api/campaigns.mdx": {
id: "api/campaigns.mdx";
slug: "api/campaigns";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"api/introduction.mdx": {
id: "api/introduction.mdx";
slug: "api/introduction";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"api/subscribers-tags.mdx": {
id: "api/subscribers-tags.mdx";
slug: "api/subscribers-tags";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"api/subscribers.mdx": {
id: "api/subscribers.mdx";
slug: "api/subscribers";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"api/tags-subscribers.mdx": {
id: "api/tags-subscribers.mdx";
slug: "api/tags-subscribers";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"api/tags.mdx": {
id: "api/tags.mdx";
slug: "api/tags";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"api/templates.mdx": {
id: "api/templates.mdx";
slug: "api/templates";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"email-services/aws.mdx": {
id: "email-services/aws.mdx";
slug: "email-services/aws";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"email-services/introduction.mdx": {
id: "email-services/introduction.mdx";
slug: "email-services/introduction";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"email-services/postmark.mdx": {
id: "email-services/postmark.mdx";
slug: "email-services/postmark";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"email-services/sendgrid.mdx": {
id: "email-services/sendgrid.mdx";
slug: "email-services/sendgrid";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/campaigns.mdx": {
id: "features/campaigns.mdx";
slug: "features/campaigns";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/imports.mdx": {
id: "features/imports.mdx";
slug: "features/imports";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/inbox.mdx": {
id: "features/inbox.mdx";
slug: "features/inbox";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/messages.mdx": {
id: "features/messages.mdx";
slug: "features/messages";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/osint.mdx": {
id: "features/osint.mdx";
slug: "features/osint";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/subscribers.mdx": {
id: "features/subscribers.mdx";
slug: "features/subscribers";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/tags.mdx": {
id: "features/tags.mdx";
slug: "features/tags";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/templates.mdx": {
id: "features/templates.mdx";
slug: "features/templates";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/workflows.mdx": {
id: "features/workflows.mdx";
slug: "features/workflows";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"features/workspaces.mdx": {
id: "features/workspaces.mdx";
slug: "features/workspaces";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"getting-started/index.mdx": {
id: "getting-started/index.mdx";
slug: "getting-started";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"getting-started/installation.mdx": {
id: "getting-started/installation.mdx";
slug: "getting-started/installation";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
"getting-started/package-instalation.mdx": {
id: "getting-started/package-instalation.mdx";
slug: "getting-started/package-instalation";
body: string;
collection: "real-docs";
data: any
} & { render(): Render[".mdx"] };
};

};
Expand Down
Loading

0 comments on commit 9d89d41

Please sign in to comment.